Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-30-2007, 05:07 PM
|
#1
|
Member
Registered: Aug 2007
Location: Florida panhandle, USA
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'
kernel (hd0,8)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/hda9 acpi=on splash=silent vga=788
~~~~~~~~~~~
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 11:31 PM.
Reason: figured out what to do and fixed it
|
|
|
09-30-2007, 05:09 PM
|
#2
|
Senior Member
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079
Rep:
|
post your /boot/grub/menu.lst
|
|
|
09-30-2007, 05:32 PM
|
#3
|
Member
Registered: Aug 2007
Location: Florida panhandle, USA
Distribution: Working with PClinuxOS 2007 and Ubuntu 10.04 at the moment
Posts: 34
Original Poster
Rep:
|
/boot/grub/menu.lst
~~~~~~~~~~~
timeout 30
color black/cyan yellow/cyan
gfxmenu (hd0,8)/usr/share/gfxboot/themes/pclinuxos/boot/message
default 0
title linux
kernel (hd0,8)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/hda9 acpi=on splash=silent vga=788
initrd (hd0,8)/boot/initrd.img
title linux-nonfb
kernel (hd0,8)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/hda9 acpi=on
initrd (hd0,8)/boot/initrd.img
title failsafe
kernel (hd0,8)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/hda9 failsafe acpi=on
initrd (hd0,8)/boot/initrd.img
title windows
root (hd0,0)
makeactive
chainloader +1
~~~~~~~~~~~
Let me guess..... I have to change all the hd0,8s to hd0,4s and the hda9s to hda5s?
Can it really be THAT simple??
|
|
|
09-30-2007, 05:51 PM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,328
|
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.
|
|
|
09-30-2007, 06:47 PM
|
#5
|
Member
Registered: Aug 2007
Location: Florida panhandle, USA
Distribution: Working with PClinuxOS 2007 and Ubuntu 10.04 at the moment
Posts: 34
Original Poster
Rep:
|
Changing the drive labels in menu.lst improved things. The menu graphics were better and after choosing a menu entry it didn't die immediately.
However...
It did come up with another error message referring to a missing hd11 and then die.
I guess there must be other files grub refers to in the boot process?
Can anyone come up with a list of all the files used by grub in the boot process so I can check through them all and change the drive references?
Thanks again for your help.
|
|
|
09-30-2007, 07:42 PM
|
#6
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,328
|
Nope - sounds like grub has done its job.
Have a look at /etc/fstab; it's where the partitions are mounted at boot.
|
|
|
09-30-2007, 11:30 PM
|
#7
|
Member
Registered: Aug 2007
Location: Florida panhandle, USA
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.
Thanks a bunch for your help.
|
|
|
All times are GMT -5. The time now is 01:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|