Reconfigure to boot from extended partition?

NoOp glgxg at
Mon Aug 27 16:58:10 UTC 2007

On 08/27/2007 09:38 AM, Rashkae wrote:
> NoOp wrote:
>> Can I simply reinstall grub and tell it to boot from hdb? ala:
>> or will that just make matters worse?
> So, if I understand you correctly, you want to be able to add/remove the 
> Windows Drive at will, but always be able to boot into Linux?
> This is certainly not a problem, and having installed Linux on an 
> Extended partition will not be a barrier at all.  The only downside I 
> see is that your Swap partition is located on your Windows drive, so 
> removing that drive will also deprive you of any swap (and indeed, might 
> cause booting problems with swap defined in your /etc/fstab)
> In any case, to make hdb bootable, you can do the following:
> Boot into linux and run grub shell
> #sudo grub
> Once in the grub shell, issue the following commands.
> device (hd0) /dev/hdb
> root (hd0,4)
> setup (hd0)
> quit
> you should then be able to boot from your Linux drive only.  However, 
> you'll have to edit the boot options if you do so.  (When grub first 
> starts, press ESC to display the boot menu, press e key to edit the 
> Linux entry, scroll down to the root (1,4) and change it to root (0,4)
> The drive your bios boots from is always hd0 to grub.  If you plan on 
> removing the Windows drive often, I would switch them around so Linux is 
> always on Drive 0 and windows is on drive 1.  (This will require a minor 
> edit to the /boot/grub/menu.lst file for Windows to boot.), but if Linux 
> is on hda and windows on hdb, then you will no longer have to edit the 
> boot options when you want to boot Ubuntu with the Windows drive removed.

Thanks! That makes sense.

More information about the ubuntu-users mailing list