LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Moving linux partition (https://www.linuxquestions.org/questions/debian-26/moving-linux-partition-242472/)

short101 10-14-2004 03:17 AM

Moving linux partition
 
Just wondering, if I delete an old ext3 partition ( kept from an old install (dont ask why)), resize my fat partition and move my current ext3 and swap partitions with partition magic ( God forbid, its a windows program, but its just too handy and easy to use ), will grub be able to find my linux partitons. Common sense tells me it probably wont, but I thought I would just ask to see if anyone actually knows if it will work. I really would like to move these partions about, but I dont want to make my system unbootable either.

jschiwal 10-14-2004 03:36 AM

If grub can't load in linux, you can press 'e' for edit and edit the locations for vmlinuz and initrd. Then you press the 'b' key to boot up with
your revised settings. After you are in linux, make the corrections you need.

I resized my SuSE partition to make room to install Mandrake. I wanted to test out these two for the AMD64 platform. I had made a mistake adding the Mandrake settings, but was able to enter the changes and boot into Mandrake Linux.

javeree 10-14-2004 04:00 AM

Actually it depends on the situation.

The stage1 which is installed on your MBR is looking for either a stage 1.5 or a stage2 (the latter when no stage1.5 has been installed). stage1 looks for this file based on CHS or LBA values, so when it is moved, grub won't work. So when you move partitions, you cannot move the partition where stage1.5 has been installed. If you do this, you can move stage2, as long as the partition doesn't get a new name (e.g. changes from (hd1,2) to (hd1,3)). Similarly, you may have to change menu.lst to indicate the new location of vmlinuz.

conclusion, it may work, but only within limited conditions.

short101 10-14-2004 05:00 AM

Yep, I was thinking that since the partition was moved, grub would be looking for it in the old spot. And of course it wouldnt be there. This sounds pretty hard to do, like telling grub which block of the hard drive to look at, and firstly I would have to find out where it should look. I think maybe this one can go into the too-hard basket. ( unless of course someone knows how to make it almost not impossible :) )

rjlee 10-14-2004 06:06 AM

You don't need to tell grub which sector of the hard drive; you only need to tell it which partition, and it will work the rest out.

Tip: Make a rescue disk first. If you can boot your system then you can use your system's configuration tools to restore the bootloader.


All times are GMT -5. The time now is 11:13 PM.