Reordered partitions

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Guest

Reordered partitions

Post by Guest »

Hello all. Happy New Year. That partition magic has a mind of its own, I tell you. My Grub
won't boot now, gives a #15 error. Grub starts, loads stage 1.5, then says something like
"Starting GRUB", then #15.

I have a multiboot PC with numerous windows and linux installations on it. I had used
cfdisk to make the partitions as I needed them, and in the extended partition they were in
a jumbled order ie sda6 then sda5 then sda8, 10, 9, etc.
I was in windows and added a partition sda14 at the end using Partition magic, and it went
ahead and changed the order by renaming all the partitions in the partition table and now
they are in the same physical order but cfdisk now shows them to be sda5 through 14 in
order.

Using Knoppix, I see that all the partitions are still there, appear to be intact, but the
menu.lst in the most recent GRUB now has all the wrong device numbers. (I assume this is
the menu.lst GRUB is using, it looks like the one I was seeing on the menu page, though
each of the older linuxes also has its own grub and menu.lst)

So, as in prior posts I researched, I went in and edited the file so that all the (hd0,x)
point to the correct places, and assumed all would be fine. The "default" file which has a
single "9" in it I left alone, though I am not sure what that does, though I think that is
the old default not the new one.

I assumed that would work, but it doesn't. Given that the partitions are all named
differently now, how do I make sure that the GRUB is pointing at the correct menu.lstor can
even find it? Is there something else I have to do?

I am reading about update-grub and grub-install, but the instructions don't seem clear to
me. Please let me know what I am missing.

Thanks,
Irwin
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Fornhamfred
Level 6
Level 6
Posts: 1243
Joined: Wed Oct 31, 2007 3:38 pm
Location: Suffolk UK

Re: Reordered partitions

Post by Fornhamfred »

HI

Is one of your linux distros PcLinux as this has a neat app called redo mbr.

This will sort your mbr but will then boot from PcLinux by default.
Guest

Re: Reordered partitions

Post by Guest »

Hi. No I don't have that distribution. I did get it fixed by reinstalling grub into the MBR using the grub shell (root, setup, quit) instructions. Works fine now.

Thanks,
IMF
DataMan

Re: Reordered partitions

Post by DataMan »

Recommendation:

1. Boot to a LiveCD Mint.
2. Using the resident partition editor take a look at your harddrive.
3. Note the SDA identifier for each partition and what it is Mint, Ubuntu /home swap NTFS etc.
4. At terminal level
a. $sudo mkdir /media/sda<insert the partition number you want to boot to here>
b. $sudo mount /dev/sda<partition number> /media/sda<partition number>
c. Exit your terminal session.
d. Launch the default file editor (Kate for KDE) and (I believe GEdit for Gnome).
e. Navigate to /media/sda<>/boot/grub/menu.lst and open the file for editing.
f. Make your adjustments accordingly in the menu.lst (remember HD# = SDA#-1)
g. Save the file.
5. Launch the terminal again.
6. $sudo grub
grub > root(hd0,<partition to boot to -1>)
grub> setup (hd0)
7. Exit and reboot to your harddrive. Hopefully all will be happy again.

DataMan
Guest

Re: Reordered partitions

Post by Guest »

Hello. Thank you, the solution worked.

I had already fixed the menu.lst, and also manually redid the fstab.

The root, setup, quit thing worked fine. It does leave me wondering what the grub-install and update-grub things to. I had seen the root,setup,quit protocol in other messages, my main sticking point was which method to use. Maybe there are multiple methods.

Anyhow, thanks again.
DataMan

Re: Reordered partitions

Post by DataMan »

Glad to hear that the "situation" is resolved. As you are learning, with Linux there are multiple "paths" to any problem resolution (enough of waxing philosphical for post New Years :D )

DataMan
Locked

Return to “Installation & Boot”