Posted by: richlyn | April 7, 2010

Separate Boot Partition Vs Dedicated Boot partition

A ‘Separate Boot’ partition means you have /boot in it’s own partition, which will be part of the operating system and will house your Linux kernel and iitrd.img files as well as GRUB files. A ‘Separate Boot’ partition will be listed in your /etc/fstab file as /boot.
The other kind of GRUB partition is called a ‘Dedicated GRUB’ Partition, a term coined (as far as I know) by a Mr. Steve Litt, who wrote a website titled Making a Dedicated Grub Partition. (‘Legacy’ GRUB).
A ‘Dedicated GRUB’ Partition contains only GRUB files and not the Linux kernel and is not mentioned in /etc/fstab and is ‘operating system independant’, (GRUB will still function the same even after the operating system has been deleted, so you can add or remove hard disks and operating systems as you please).

A ‘Separate Boot’ partition is made  during installation. You need to select ‘manual partitioning’, when you get the the partitioning phase of the installation. It should be mounted as /boot. Your /boot partition may be formatted with any file system supported by GRUB. Many people suggest using ext2 without knowing why, I’m only guessing but I think maybe the reason was to minimize file system overhead to save disk space in very small hard disks or USB flash memory sticks, (a habit from the old days when hard disks were very small and expensive). If you’re using a normal sized modern hard drive or even a USB flash memory stick of a decent size then you can probably afford to use ext4. ReiserFS is also good for GRUB, with even smaller file system overhead than ext2 if you’re squeezed for disk space. Ext4 would be my favorite all purpose file system now though. Your main Ubuntu partition will be mounted as /, and again I now prefer ext4. Most people also make a Linux ‘Swap area’, of around 500 MiB to 1 GiB. Some people like a ‘separate /home’ partition too, where all their personal files and settings will be stored. It’s then possible to re-install the operating system if that ever becomes necessary, (it shouldn’t), however, you should always have a backup of your personal files on some other media anyway. Ext4 for that too, unless you need to share files with an older Ubuntu or some other Linux that doesn’t support ext4 yet. Personally, I don’t like having a ‘Separate /home’, but that’s a matter for personal preference.

Simple and quick way to make a ‘Dedicated GRUB 2 Partition’. Install Ubuntu in the normal way first. Create a new partition or use one that’s already there which doesn’t have any directory named /boot in it, (or it will be overwritten).

How To Make a Dedicated GRUB 2 Partition – use grub-install

1. Choose an existing partition or create a new one and format it with a file system, you will need at least about 60 MiB of space in the partition for grub 2 files, but a little more room than that might be advisable.

2. Format the partition with a file system and optionally give the file system a LABEL, (from the right-click menu in GParted).

3. Mount the partition – Usually ‘Places’–>’Removable Media’–>’FS_LABEL’,

4. Run a grub-install command similar to the one shown below,

Code:

sudo grub-install –root-directory=/media/grub2 /dev/sda

Where: ‘/media/grub2 is the name of the mount point for the partition where I want to make a new /boot/grub directory and fill it with GRUB files.
Where: ‘/dev/sda’ is the hard disk in which I want to write the stage1 code to MBR in.

You can relax the file permissions for easier editing now that it’s not part of an operating system,

Code:

sudo chmod 777 -R /media/grub2

Next, let GRUB in Ubuntu make your new grub.cfg file automatically for you in your Dedicated GRUB Partition,

Code:

sudo grub-mkconfig -o /media/grub2/boot/grub/grub.cfg

After that command has run, you can use your Dedicated GRUB as it is if it suits you or you can customize it in any way you like. In an installed GRUB you’re not supposed to edit /boot/grub/grub.cfg, but in an ‘operating independant Dedicated GRUB Partition you can edit the grub.cfg in any way you like.

One of the advantages of having GRUB in a ‘Dedicated GRUB Partition’ is that it is ‘operating system independent’, so GRUB will still work regardless of whether there’s a GRUB-freindly operating system around or not. Another nice thing about it is you can make up your own user friendly operating system titles and just have a short list of them. You can use various commands to boot with.

The non-good thing is if you want your grub.cfg to be up to date and booting the latest Linux kernels, you’ll need to keep running grub-mkconfig fairly often manually, as Ubuntu won’t automatically update the file as it would if the file was inside Ubuntu.
If you have a customized grub.cfg, it wouldn’t be a good idea to run grub-mkconfig unless you get the command to make you a grub.cfg with some other filename so as not to overwrite your present grub.cfg. You could set a configfile command in your customized grub.cfg to have it look at the next configfile. You can have a lot of fun with GRUB in a ‘Dedicated GRUB Partition’.

About these ads

Responses

  1. [...] The busiest day of the year was May 3rd with 55 views. The most popular post that day was Separate Boot Partition Vs Dedicated Boot partition. [...]

  2. [...] a face o noua partitie de tip "ext3", de aproximativ 200-300mb. Apoi urmezi acest ghid: http://rxezlqu.wordpress.com/2010/04…oot-partition/ Tinand cont ca nu folosesti Linux, nu va trebui sa repeti procesul decat daca instalezi alt sistem [...]

  3. [...] pentru instalare pe o partitie separata (daca vrei ca bootloaderul sa fie independent fata de OS): http://rxezlqu.wordpress.com/2010/04…oot-partition/ . Dezavantajul ar fi ca de fiecare data cand apare un kernel nou trebuie sa repeti comanda [...]

  4. [...] in Windows. Pentru modificari, poti folosi un LiveCD. Ai aici un ghid pentru o partitie separata: http://rxezlqu.wordpress.com/2010/04…oot-partition/ . Parametrul –root-directory=DIR a fost inlocuit de -boot-directory=DIR ; in noul parametru, DIR [...]

  5. […] I use a dedicated GRUB 2 partition for years, and no regrets up to now, and I edit the file grub.cfg (menus entry without problems). A hint how to do it -> http://rxezlqu.wordpress.com/2010/04…oot-partition/. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: