1827809 Members
1935 Online
109969 Solutions
New Discussion

/boot

 
SOLVED
Go to solution
steven Burgess_2
Honored Contributor

/boot

Hi everyone

During a number of builds, I overlooked the creation of a seperate filesystem for /boot. I know that this isn't a necessity but would like to rectify it.

If I look at my partition table I can see the boot partition

/dev/sda1 * 1 13 103981+ 83 Linux

In a normal situation I would consider tarring the contents of the dir, creating a new FS, with a new mount point, extracting the contents of the directory into the filesystem, remove the old files and rename the new mount point to the required etc

Any ideas what would be the best thing to do. I haven't really got anywhere to test this at the moment

Thanks in advance

Steve
take your time and think things through
3 REPLIES 3
Stuart Browne
Honored Contributor
Solution

Re: /boot

Generally the reason for a '/boot' filesystem is to have the boot-files (kernel) in the first 1024 cylenders of a hard-disk.

On newer systems, the need for this has gone away, as system BIOS' have the ability to access more of a disk during those early stages of boot-up (were the controller drivers aren't available).

If you really want to put one in place, it'd be best to try to get that sort of thing in place.

To do this, you'd need to re-partition the harddrive, and if possible, create a partition at the very beginning of the disk. So you'll need a tool to move the contents of the disk around ('parted' can do this I believe) to free up that space.

Once that's done, you create your filesystem in the free'd up space at the start of the disk. You make sure you 'e2label' the filesystem as '/boot'. Create the entry for the filesystem in '/etc/fstab', and then mount the filesystem somewhere temporary.

Copy the content to the temporary mount point, then 'mv /boot /boot.old;mkdir /boot', and re-mount the new filesystem to '/boot'.

Here you'll need to re-install the bootloader ('grub-install', or 'lilo'), hopefully without any errors.

Moment of truth time.. Make sure you have a rescue disk (one of the RH CD's) handy, then reboot.
One long-haired git at your service...
Gopi Sekar
Honored Contributor

Re: /boot


if you are already having a small partition to have boot files then it is very easy.

* just format the partition as ext3 or whatever the file system you want.
* mount this partition in some temporary mount point.
* copy the contents of /boot files to this mount point
* remove contents of /boot directory, make sure the directory exists
* add the following entry in /etc/fstab
/dev/ /boot ext3 defaults 1 1

* update grub.conf/lilo.conf file to reflect the partition where the boot files resides. field to update is root


reboot your system and it should come up.


if you dont have free partition then you have to follow stuart's suggestion.

Hope this helps,
Gopi
Never Never Never Giveup
steven Burgess_2
Honored Contributor

Re: /boot

Hi Guys

Thanks for the responses, will be working on this over the next couple of days

will post the outcome

Regards

Steve
take your time and think things through