Moving /boot from /dev/hda2 to /dev /hda3
I have four partitions on hda,
/swap /dev/hda2 (boot) /dev/hda3 (root) /dev/hda4 (/var) Home is on another HD. Now what I need to do is install XP to test something, and I may just keep it for those games that don't work with CrossOver and VirtualBox. But...... I have the maximum amount of partitions allowed. Both XP and Gparted says that. (All of the above partitions are primary ones.) So what I want to do is move the boot from /dev/hda2 to the root, /dev/hda3. But I don't know how to do this. Is there a simple way of just reinstalling Grub maybe? Or a few files to edit to point to the /dev/hda3/boot? (I also tried to install XP on another HD, but it says it need to write to hda and there where no usable partitions. so I am not going to bother with doing it that way, XP is not the brightest operating system.) Thanks |
Since all partitions are Primary then no addtional partitions can be added. Is ther still space not partitioned on the drive?
If there are 3 primary partitions then the last one would be an extended partition where logical partitions can be created in. The limit I do not know. Of course XP really loves the primary first partition of the first drive. But if you install the second drive by itself and install XP. After the install put the first drive back in as the master and the windows as slave. Then for a grub option use something like this to swap drives ids on boot of XP. Code:
title windows Brian Brian |
I would doubt moving an average /boot would free enough space for XP.
Probably don't need to anyway. Install Virtualbox in Linux, and run XP as the guest - that way it sees just the (virtual) disk you define for it. Works fine - if you have enough space. Of course the opposite also works fine. |
Hi Neo-Leper,
easy-peasy: 1. umount /boot 2. mount /dev/hda2 /mnt 3. cp -a /mnt/* /boot 4. umount /mnt 5. Adjust /etc/fstab and /boot/grub/menu.lst accordingly 6. grub-install /dev/hda (probably necessary / assuming you have GRUB in MBR) And better not destroy old /boot partition before you know it works... Rupert |
Quote:
|
Quote:
I tried sudo umount /boot in the terminal, I also tried sudo umount /dev/hda2 with the same result. It is telling me the device is busy. Gparted won't let me unmount it either. |
Quote:
|
Quote:
|
I will give it a try with the gparted disk later. Thanks. I was wondering if I should try it that way, it is still easy to do either way :)
|
Did it my way and didn't break anything ;) lol
Everything I tried was not working. I have no idea why, but it is probably due to user error, lol.
So I did it my way. I used the Gparted live cd and resized hdb and put aside 10G(fat32) for XP, while keeping hdb1 the same (it is where my /home is,) XP=hdb2. I went into my bios and switched the auto for hda and SATA off. Tested it by booting and there was nothing to boot from hdb, so all was well so far. So I rebooted with the XP installation disk in. I tried to install it on the fat32 I set up with gparted but it didn't want to do that, so I did a quick format with the ntfs file system and installed it. Before when I didn't turn off anything in the bios and tried to install XP on hdb or the SATA partition it kept telling me it had to write to hda and it couldn't, it wanted me to format it first, (NOT!!!) But this time it worked even though XP did pick up all the HD's and partitions. So I hoped it wouldn't rewrite the MBR....... But XP did, have I mentioned today how much XP annoy's me?!!! So I booted the Ubuntu 7.04 installation (livecd) disk. I opened the terminal and type in "sudo grub" grub> came up. So I then typed in where my /boot was, which was "root (hdo,1)" and then enter. After that I typed in "setup (hd0)" It reinstalled grub and all is fine. All I have to do is add XP to fstab and menu.lst. So /boot stays where it is and XP is now installed. |
Ok. My way is having one problem. I am going to see if I can figure out a solution first and then just post that here. XP really annoys me, lol.
|
I found a way to work around the problem I am having until I can find, if I can find, a better solution.
What happened was when I disabled HDA and SATA in the BIOS XP completely installed in HDB as it should (HDB is the slave and HDA is the master.) I added this to grub, title Windows XP root (hd1,1) savedefault makeactive chainloader +1 I also tried it these ways, title Windows XP root (hd1,1) savedefault chainloader +1 title Windows XP root (hd1,1) makeactive chainloader +1 title Windows XP root (hd1,1) chainloader +1 But no matter what grub would not boot XP. It said starting up and it would just hang there. So I went into the bios (F1) and changed the boot order so that the slave, HDB where XP is, would boot first and then XP booted fine. So for now I have a boot menu in the BIOS, the default setting is set to boot the master (hda) with grub. If I want to boot XP i have to hit (esc) when I start the computer so it brings up the bios boot menu. From there I can choose to boot the slave, hdb, with XP. It works but I would like to get this so Grub does it all. Anyone have any ideas? I won't be using XP that much so it is not a huge deal. I would just like to figure this out. Also can anyone explain to me what I did wrong or missed when I installed XP this way? Thanks. |
I got it to work and boot from grub. This is what my XP entry looks like in fstab now.
title Windows XP map (hd0) (hd1) map (hd1) (hd0) root (hd1,1) savedefault makeactive chainloader +1 |
All times are GMT -5. The time now is 07:10 AM. |