Upgrading to 1.5TB drive, Grub problem

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 11:41 am

So I bought a non-affected Seagate 1.5TB drive on sale. I've had the devil's own time cloning my old 320 to this new one, and I think I finally discovered the root of my problem.

But first, what I did:
1) Boot with Knoppix, dd the old drive to the new one. Takes about a day and a half.
2) Boot new hard drive. Works great.
3) Boot Gparted LiveCD. Grow NTFS partition (sda1) to 1.3TB, move swap (sda2) and Ubuntu partition (sda3) to end of disk.
4) Reboot to hard drive. Grub comes up with a cryptic Error 17.
5) Cuss and boot to Ubuntu CD. Try to run grub-install onto sda3, and it says that the stage1 file isn't readable, even though it's right there and less has no problem reading it.

After some digging, I think my Ubuntu partition is now too far towards the back of the disk, which puts Grub past whatever its cylinder limit is. I've got Gparted shrinking the NTFS partition by 50MB (which takes about 12 hours), and then I plan to put a /boot partition at the very beginning of the drive, presuming nothing's going to throw a fit about putting what I assume will be sda4 at the beginning.

Bah. This reminds me of the bad old days of LILO. :evil:

edit: I'd also tried using Seagate's disk cloner, with the same result, although it didn't take quite as long as dd did.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3232
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 12:57 pm

I'm going out on a limb here, but I think it may have something to do with you using dd instead of doing an image. I've run into error 17 before, but I don't remember what I did, specifically or vaguely, to resolve the issue.

Also, take a look here:
http://ubuntuforums.org/showthread.php?t=442945

On a side note, I've had very good experiences using SystemRescueCd to manage storage devices.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 1:54 pm

titan wrote:I'm going out on a limb here, but I think it may have something to do with you using dd instead of doing an image.


No, I also got Error 17 after I used Seagate's cloning tool, which is a branded version of Acronis TrueImage.



Doesn't seem helpful, but thanks.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3232
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 6:10 pm

bthylafh wrote:After some digging, I think my Ubuntu partition is now too far towards the back of the disk, which puts Grub past whatever its cylinder limit is.
Grub doesn't really have a cylinder limit if your BIOS supports LBA (ignoring the unrelated problem of partitions > 2GB that must use GPT) -- Error 18 is actually the error you get when your BIOS can't support it ("Selected cylinder exceeds maximum supported by BIOS"). Unless you have an old 28-bit limited LBA BIOS, all you should have to do is reinstall Grub after moving the partition.

Typically how I reinstall grub from a rescue boot is:
1. mount my existing hierarchy under say /mnt (including /mnt/boot if that's separate).
2. mount -t bind /dev /mnt/dev
3. mount -t bind /dev/pts /mnt/dev/pts
4. mount -t proc none /mnt/proc
5. chroot /mnt
6. grub-install /dev/sda (or whatever)

You said you tried to run grub-install onto sda3, but you'd probably want to install to sda (i.e. the disk's MBR, not the partition superblock). Also, make sure your /boot/grub/menu.lst refers to the NEW correct partition numbers for the (hd?) stuff (also you may have to change /etc/fstab if the partitions are mounted by number and have changed).
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 9:18 pm

bitvector wrote:Typically how I reinstall grub from a rescue boot is:
1. mount my existing hierarchy under say /mnt (including /mnt/boot if that's separate).
2. mount -t bind /dev /mnt/dev
3. mount -t bind /dev/pts /mnt/dev/pts
4. mount -t proc none /mnt/proc
5. chroot /mnt
6. grub-install /dev/sda (or whatever)


Tried that just now from the Ubuntu LiveCD. Same result:
root@ubuntu:/# grub-install /dev/sda
Searching for GRUB installation directory ... found: /boot/grub
The file /boot/grub/stage1 not read correctly.


You said you tried to run grub-install onto sda3, but you'd probably want to install to sda (i.e. the disk's MBR, not the partition superblock).


I mistyped. I meant that I told grub to install to /dev/sda but to use /dev/sda3 as its root.

Also, make sure your /boot/grub/menu.lst refers to the NEW correct partition numbers for the (hd?) stuff (also you may have to change /etc/fstab if the partitions are mounted by number and have changed).


I'll remember that once I try the /boot partition idea.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3232
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 9:39 pm

Actually, now that I think of it, try running "update-grub" first and then rerunning grub-install (possibly adding --recheck to grub-install).
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 9:47 pm

OK, I was right about needing a separate /boot partition. GParted labeled it as sda4, so I did your suggestion, except instead of "-t bind" I did "--bind" because the other way doesn't work.

Now I can get my WinXP partition to boot just great, but trying to boot Linux leads to the Error 18 with the cylinders you were talking about. Maybe I need to go back and make sure menu.lst is pointing to the new /boot instead of the old one. If it's pointing to the right place but still won't boot... oy.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3232
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 9:52 pm

Here's the relevant stanza from my menu.lst:

Code: Select all
title      Ubuntu 8.10, kernel 2.6.27-11-generic
root       (hd0,2)
kernel     /boot/vmlinuz-2.6.27-11-generic root=UUID=6ca30b5a-6299-4b07-9ab3-7834601787ef ro quiet splash vga=795
initrd     /boot/initrd.img-2.6.27-11-generic
quiet


Do I need to change that to have the root as the new /boot partition, or what should I do?
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3232
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 10:08 pm

bthylafh wrote:GParted labeled it as sda4, so I did your suggestion, except instead of "-t bind" I did "--bind" because the other way doesn't work.
Oops, it was supposed to be -t none -o bind, but --bind is the same.

bthylafh wrote:Do I need to change that to have the root as the new /boot partition, or what should I do?
Well, based on what you've said, I suppose you'd want root (hd0,3), which should be sda4 and you'll need to remove the /boot prefix and just have the kernel and initrd as /vmlinuz... and /initrd... (since /boot is a separate partition, they are in the top-level directory in that partition -- they just get mounted at /boot).
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 10:13 pm

Duh, that would be obvious if I'd think a bit about it. :oops: Thanks!
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3232
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Upgrading to 1.5TB drive, Grub problem

Postposted on Tue Mar 03, 2009 10:27 pm

GREAT REJOICING! Ubuntu's booting and the 1.5 is now fully functional. Many thanks!
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3232
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 2 guests