LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Booting after partition has been shifted (https://www.linuxquestions.org/questions/linux-software-2/booting-after-partition-has-been-shifted-666936/)

Unforgiven79 09-01-2008 03:55 PM

Booting after partition has been shifted
 
Hello

I am facing the following problem:
I have a dual-boot system (PC Linux OS + Win XP); XP is on partition hd1, PCLOS USED TO BE on partition hd9
I had to re-install XP (of course, after 2.5 yrs), which of course smashed my Grub menu on MBR.
Furthermore, while installing XP, I asked to completely format what was C: and clever Windows shifted most my partitions on the partition table. Hence, PCLOS went on hd10.

Recovering Grub was little problem after all, via the live CD. I just had to setup it + editing the /boot/grub/menu.lst file by replacing "hd9" with "hd10" everywhere.
So, now Grub works again and launches PCLOS, but the latter booting then freezes at once and my laptop hard-drive LED starts blinking... is there any other file where I should change "hd9" to "hd10" to make work again? Or just too many?

Thank you

yancek 09-01-2008 04:12 PM

Probably /etc/fstab.

Did you mean xp was on hda1 and PCLOS was on hda9. What's on hda2-8? Might post your menu.lst and fdisk -l output for more accurate answers.

pixellany 09-01-2008 04:15 PM

I'm not quite sure how a Windows install would shift partition numbers like that....but that's another story.

Assuming that you can recover by editing menu.lst, you need to edit two entries in each menu item:
Here is a typical entry--for the case where there is no separate partition for /boot:
Code:

title  Kubuntu
root (hd0,4)
kernel /boot/vmlinuz root=/dev/sda5
initrd /boot/initrd
boot

I have put the two entries to be changed in bold. The first tells GRUB where it's files are, and is in "grubese" ---(hd0,4) means the 5th partition on drive #1.
The second entry (in Linuxese) tells the kernel what partition to mount as /.

pixellany 09-01-2008 04:17 PM

Quote:

Originally Posted by yancek (Post 3266480)
Probably /etc/fstab.

Yes, you may need to do this also...

Unforgiven79 09-02-2008 01:51 AM

Thanks for the hints. Now I am away from home, I will try them all and produce a feedback.

P.S. hda2-8 are just partitions with different subjects of data ("music", "programs")

Unforgiven79 09-02-2008 02:30 PM

Ehi, thanx!

I fixed the root entry in menu.lst and with that the PCLOS was launched and but notified an error after a while.
The I fixed the fstab file as well (/ and /home were wrong) and now everything works as before! I am now posting in my Linux environment...

Thank you again for your fast help!

pixellany 09-02-2008 02:33 PM

we like happy endings....

We REALLY like members who take the time to post feedback like this.


All times are GMT -5. The time now is 03:09 AM.