new hard drive, resized partitions, need to redo grub
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: Working with PClinuxOS 2007 and Ubuntu 10.04 at the moment
Posts: 34
Rep:
new hard drive, resized partitions, need to redo grub
{SOLVED}
Hey guys. PCLOS user question.
I just upgraded my old 20Gb HD with a new 80Gb HD.
I used GParted to copy dual boot partitions to new drive, but modified the linux partition with /boot from about 2Gb to 10Gb in size. It starts in the exact same sector as on the old drive, but following partitions are pushed to the 'right'. Also increased the linux swap partition from 1/2 to 1 Gb in size.
When I boot now, right before the grub menu appears there is an error message:
"snip"
~~~~~~~~~~~
Booting 'linux'
Then the grub menu appears and appears to function OK.
When I select linux, everything halts, the graphics disappear, and I get:
"snip"
~~~~~~~~~~~
Error 22: No such partition
~~~~~~~~~~~
The system still boots into windows just fine so I'm guessing my resizing of the linux partitions has messed grub's pointers up.
I consolidated several windows partitions and placed them at the back end of the new drive, so the order of partitions is different too. I'd guess that since my old drive had more paritions that grub is now pointing to the wrong place for booting up (ie. hda9 was the old linux partition and now it's hda5).
The previous setup had the MBR redirect to grub installed on the boot record of the linux partition.
Any advice on how to re-install grub so it points at the proper partition (hda5) for my new partition configuration? I'm reluctant to muck around trying things out since changing grub requires root access and I really don't want to make things any worse. At least I can run in windows now.
My current partition table looks like this:
"snip"
~~~~~~~~~~~
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 510 4096543+ b W95 FAT32
/dev/hda2 511 9729 74051617+ f W95 Ext'd (LBA)
/dev/hda5 1814 3118 10482412+ 83 Linux
/dev/hda6 3119 3249 1052226 82 Linux swap/Solaris
/dev/hda7 3250 3486 1903671 83 Linux
/dev/hda8 7119 9729 20972826 b W95 FAT32
~~~~~~~~~~~
I've only been using PCLOS for about a month, so please use small words and assume I know nothing about 'the basics' of linux.
If I'm sadly mistaken in my understanding of the problem I'd appreciate it if someone would clarify what's going on so I can learn something from this. lol.
Thanks.
Last edited by dcalki; 09-30-2007 at 10:31 PM.
Reason: figured out what to do and fixed it
Yep.
You can even do it at the grub menu to get you going, and fix it when you get logged on. Highlight the linux entry and hit <e>, do the same for the kernel and initrd lines.
When finished, <b> to boot. Read the on-screen help along the way.
Your initial error would have been because of the gfxmenu line.
Distribution: Working with PClinuxOS 2007 and Ubuntu 10.04 at the moment
Posts: 34
Original Poster
Rep:
Yep. fstab was the ticket. It still had the old definitions from the old drive. Once I commented out the partitions I combined and moved and renumbered the partitions properly to match the labels in grub, it booted up without a problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.