LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-10-2006, 12:19 PM   #1
eldiener
Member
 
Registered: Nov 2006
Distribution: Mepis, CentOS, OpenSuse
Posts: 56

Rep: Reputation: 16
Creating and booting from a separate /boot partition


I know how to mount a general directory from the / filesystem to a separate partition, such as mounting /home on its own partition after copying the appropriate files.

I have installed a Linux distro which did not allow me to setup a separate /boot partition during the graphical distro configuration, but I want to have a separate /boot partition. I have already created a partition on a hard drive to act as the separate /boot partition. What are the steps needed to now setup this Linux distribution to boot off of the separate boot partition ?
 
Old 11-10-2006, 01:56 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
The steps are:
- create a file system on that partition (ext2 is the best choice)
- move your old /boot files there
- remove your old boot partition
- setup bootloader
- boot

Also, have a boot CD ready in case something goes wrong.

It helps a lot if you tell us what distro you use. Best is to put it into your profile so it appears left to your posts.
 
Old 11-10-2006, 05:25 PM   #3
eldiener
Member
 
Registered: Nov 2006
Distribution: Mepis, CentOS, OpenSuse
Posts: 56

Original Poster
Rep: Reputation: 16
Steps for moving /boot

Quote:
Originally Posted by uselpa
The steps are:
- create a file system on that partition (ext2 is the best choice)
- move your old /boot files there
- remove your old boot partition
- setup bootloader
- boot

Also, have a boot CD ready in case something goes wrong.

It helps a lot if you tell us what distro you use. Best is to put it into your profile so it appears left to your posts.
The distro in question is Mepis 6.0.

I understand everything but "setup bootloader". What command(s) does that entail ? I imagine it is calling 'grub' with some parameters but I am not sure what that is or if there is more to it than that. Any further details on that would be appreciated.
 
Old 11-11-2006, 02:56 AM   #4
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
I don't use grub, but I think there's a "grub-install" command to setup grub from scratch. Usually you don't have to do that when you change your grub configuration (unlike lilo), but as you change your /boot partition I'd do it anyway.

And again, have a live CD handy just in case.
 
Old 11-11-2006, 08:15 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
To set up GRUB--and some other notes:

Once you have created the new /boot partition, you need to also create an entry in /etc/fstab so that it will mount automatically at startup.

Note: You do not mount a directory--you mount (connect) a device TO a directory. In this case the device is a partition. Once you have an fstab entry, you can use a shorthand--eg "mount /boot"---which really means: "mount the partition to /boot that is specified in fstab/" Very confusing.....

To set up GRUB...Assume that your new /boot is partition hda3:
Code:
grub   (starts the GRUB shell)
root (hd0,2)    (grub counts from 0---also note that if your /boot is sda3, this entry would still be the same--GRUB always uses hd.)
setup (hdo)   (installs GRUB on the mbr of drive 1)
Finally, you will need to edit the grub config file in /boot/grub (menu.lst AKA grub.conf).

Last edited by pixellany; 11-11-2006 at 08:17 AM.
 
Old 11-12-2006, 06:13 PM   #6
eldiener
Member
 
Registered: Nov 2006
Distribution: Mepis, CentOS, OpenSuse
Posts: 56

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by pixellany
To set up GRUB--and some other notes:

Once you have created the new /boot partition, you need to also create an entry in /etc/fstab so that it will mount automatically at startup.

Note: You do not mount a directory--you mount (connect) a device TO a directory. In this case the device is a partition. Once you have an fstab entry, you can use a shorthand--eg "mount /boot"---which really means: "mount the partition to /boot that is specified in fstab/" Very confusing.....

To set up GRUB...Assume that your new /boot is partition hda3:
Code:
grub   (starts the GRUB shell)
root (hd0,2)    (grub counts from 0---also note that if your /boot is sda3, this entry would still be the same--GRUB always uses hd.)
setup (hdo)   (installs GRUB on the mbr of drive 1)
Finally, you will need to edit the grub config file in /boot/grub (menu.lst AKA grub.conf).
I was able to successfully run grub, then root, and finally setup. In my case I had grub installed in /dev/sda6 and not in the mbr. I have two further questions before trying to boot from this /dev/sda6 partition:

1) In the menu.lst, since my / partition remains the same, do I just need to change the grub root command to my new /boot partition ? In my menu.lst copied to /dev/sda6 I read:

title MEPIS at sda9, kernel 2.6.15-26-386
root (hd0,8)
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/sda9 nomce quiet vga=791
boot

Do I just change the root command to:

root (hd0,5)

and leave everything else alone ?

2) In my /etc/fstab for the new /boot partition is:

/dev/sda6 /boot ext3 nodev,nosuid 0 2

correct, or should I be specifying something else after the first three entries on the line ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
boot fails when booting from lvm partition jlatl69 Linux - Newbie 6 03-07-2006 06:23 AM
Problem with Booting after creating ext3 partition on External USB ynyus75 Suse/Novell 1 11-13-2005 02:23 PM
When booting from a CD I can't boot from my root partition. sharpie Linux - Newbie 3 01-28-2004 05:20 PM
creating new partition before boot partition?? rose_bud4201 Linux - General 17 02-07-2003 12:25 PM
Creating boot partition during Slack install bleach Linux - Software 5 11-30-2001 01:05 AM


All times are GMT -5. The time now is 04:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration