Remove lfs-uefi.txt symlink
[linux_from_scratch_hints.git] / PREVIOUS_FORMAT / large_disks.txt
blob5165c55f058606b0e38a42eaa38e158f000812b8
1 TITLE:          Large Disks
2 LFS VERSION:    any
3 AUTHOR:         Ivan McDonagh <ivan@svgalib.org>
5 SYNOPSIS:
6         Using hard-drives > 504Mb
8 HINT:
9 v1.0
11 1. Why this hint ?
13 I am using a 486DX100 with a 2.1GB hdd and found that because of the 504MB
14 BIOS limitation I couldn't (at first) get my shiny new LFS system to boot.
15 This material is covered much more comprehensively in the Large Disk How-To
16 but a simple set of instructions would have helped me very much and I hope
17 this hint will help others :)
19 2. Partitioning the drive
21 Most older BIOSes have a requirement that the boot partition be contained
22 entirely within the first 1024 cylinders. Why this is so is discussed in
23 the Large Disk How-To but for the moment just accept that this means you
24 have to setup your hard-drive differently to someone who does not have an
25 old BIOS :)
27 The problem I had is that I wanted my base distribution to boot from the
28 hard-drive and also have my LFS system boot from the hard-drive. I used
29 Debian 2.0 and found that this just wasn't going to be so easy !!! The
30 solution ? I'm glad you asked :)
32 I decided that for my installation, a single LFS partition as described in
33 the book would be perfectly fine and dandy for my needs and a single
34 partition was required for the base distribution. This makes things a lot
35 more simple as well :) ... Don't forget to allow another partition for your
36 swap area :)
38 So, we need 3 partitions in total:
40 1. Base distro
41 2. LFS
42 3. Swap - to be shared between LFS and whatever your base distro is
44 BUT ! ... because of the BIOS limitation, we also need a /boot partition
45 giving us four in total
47 So my personal setup now looks something like:
49 partition       mount point     size
50 /dev/hda1       /boot           20Mb
51 /dev/hda2       /mnt/lfs        1000Mb (this is the LFS partition, initially mounted at
52 /mnt/lfs)
53 /dev/hda3       /               750Mb (this is the root partition of the base distro)
54 /dev/hda4       swap            30Mb
56 NOTE - these are not specific partition sizes to take as gospel - adjust
57 and rearrange as necessary :) - the only thing you need to be especially
58 aware of is putting your /boot partition at the start of the drive and
59 keeping the size fairly small - 20Mb is probably as big as you want it and
60 even 10Mb is plenty under most circumstances.
62 3. Installing the base distribution
64 This really is the easiest part of it all ... just install as you normally
65 would to whatever partition you are using (/dev/hda3 in this example) but
66 when the time comes and you are asked whether to boot from the hard disk
67 say "No" and choose to make a boot floppy instead.
69 4. Installing LFS
71 Boot up your machine using the boot floppy that you created in section 3,
72 mount the LFS root partition as described in the book and create the
73 directories. After you have created all of the directories, make sure you
74 mount also the LFS /boot partition. In my example, the command would be:
76 root:~# mount /dev/hda1 /mnt/lfs/boot
78 now you are ready to start compiling - go to it :)
80 5. /etc/lilo.conf and /etc/fstab
82 This is where you tell the machine how to boot up correctly and so is the
83 most important thing to get right :)
85 /etc/lilo.conf is correct as it stands in the book right now so you
86 shouldn't have to anything special except make sure that your root
87 partition is correctly named :)
89 /etc/fstab will need to be altered to suit your setup. Partitions are
90 mounted in the order in which they are mentioned in /etc/fstab so it is
91 important that you mount your / partition first and then mount the /boot
92 partition. Because /boot contains the kernel I like to have it checked
93 every so often during the boot sequence and consequently have set the
94 options appropriately :)
96 My /etc/fstab looks like this (you may have to change the partition naming
97 to suit yourself)
99 /dev/hda2 / ext2 defaults 1 1
100 /dev/hda1 /boot ext2 defaults 1 1
101 /dev/hda4 swap swap defaults 0 0
102 proc /proc proc defaults 0 0
104 Notice that we don't bother with /dev/hda3 which is where the base distro
105 is - we don't need that partition any more and so don't mount it. Later on,
106 you can use it for mail or news or whatever and add the entry to /etc/fstab
107 but it really isn't needed at the moment :)
109 6. Extras
111 To make things easier for yourself if think you might boot into the base
112 distro more than once you can edit the /etc/fstab file created by the
113 distro to ensure that the LFS / and /boot are mounted at boot time. To do
114 this just add these lines to the /etc/fstab file:
116 /dev/hda2 /mnt/lfs ext2 defaults 0 0
117 /dev/hda1 /mnt/lfs/boot ext 2 defaults 0 0
119 notice that I haven't bothered with file system checking at this stage -
120 hopefully you won't be rebooting so often that max count is ever reached
121 before you are using LFS only :)
123 7. Thanks
125 Thanks to Gerard and all of the many contributors for making LFS such an
126 easy, educating and entertaining process.
128 Thanks very much to Andries Brouwer (aeb@cwi.nl) for the informative and
129 very well written Large Disk How-To without which I would have given up and
130 thrown my computer out of the window :)
132 Comments on this hint may be directed to me at ivan@svgalib.org