Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Difficult transition to larger hard drive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Wed Mar 30, 2005 5:17 am    Post subject: Difficult transition to larger hard drive Reply with quote

I'm trying to move my system to a larger hard drive and I just don't seem to be able to get it right. The old hard drive is /dev/hda, the new one, /dev/hdb. So far I've:
1) partitioned /dev/hdb
2) set the boot flag at /dev/hdb1
3) removed the old boot flag from /dev/hda1
4) made the filesystems (mke2fs & mkswap)
5) copied all the files using cp -a
6) edited /etc/fstab and /boot/grub/grub.conf to update the paths
7) used grub to update the master boot record
8) checked my BIOS to make sure it's aware of /dev/hdb

When I boot my machine, it will boot from the new boot partition (/dev/hdb1). It will find and load the kernel. It will add the new swap space(/dev/hdb6). Then it tries to mount the / partition (/dev/hdb5) and it fails. It says that it can't mount the partition RW and wants me to log in as root to fix the problem. Once I log in, and type "mount" to see what's mounted, it lists the partitions that were mounted when I copied the system from one drive to another. So I edited /etc/mtab to remove this old info, hoping that it would fix the problem, but when I reboot the same data is back in /etc/mtab.

Does anyone have any idea why I wouldn't be able to mount my /dev/hdb5 partition at /? If I can get that figured out, everything else might fall into place.

Thanks
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Wed Mar 30, 2005 5:27 am    Post subject: Reply with quote

Silly question, but did you change the option real-root=(hd0,5) to real-root=(hd1,5) in your grub.conf? Did you edit the right one? Did you install grub to (hd0) or (hd1) :roll:

If you wanna keep the small disk you should install grub to (hd0) with root=(hd1,0) and real-root=(hd1,5)
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Mar 30, 2005 5:34 am    Post subject: Re: Difficult transition to larger hard drive Reply with quote

t011 wrote:
I'm trying to move my system to a larger hard drive and I just don't seem to be able to get it right. The old hard drive is /dev/hda, the new one, /dev/hdb. So far I've:
1) partitioned /dev/hdb
2) set the boot flag at /dev/hdb1
3) removed the old boot flag from /dev/hda1
4) made the filesystems (mke2fs & mkswap)
5) copied all the files using cp -a
6) edited /etc/fstab and /boot/grub/grub.conf to update the paths
7) used grub to update the master boot record
8) checked my BIOS to make sure it's aware of /dev/hdb

When I boot my machine, it will boot from the new boot partition (/dev/hdb1). It will find and load the kernel. It will add the new swap space(/dev/hdb6). Then it tries to mount the / partition (/dev/hdb5) and it fails. It says that it can't mount the partition RW and wants me to log in as root to fix the problem. Once I log in, and type "mount" to see what's mounted, it lists the partitions that were mounted when I copied the system from one drive to another. So I edited /etc/mtab to remove this old info, hoping that it would fix the problem, but when I reboot the same data is back in /etc/mtab.

Does anyone have any idea why I wouldn't be able to mount my /dev/hdb5 partition at /? If I can get that figured out, everything else might fall into place.

Thanks
I doubt that the problem has really anything to do with mtab, but just in case I advice you to change this file from a boot cd. As you say the partition is mounted read only, that is the reason for mtab to have the same contents each time you reboot. I'd also look if there is something bad into fstab, if not sure post it, many incorrect options can get to behaviours like the one you describe.

The resto of what you did is fine. Oh! One thing, there is nothing wrong if you change the bootable flag of one partition to the 'politically correct' setting, but, linux do not care at all about that flags, so for linux they are pretty useless, this includes also the hidden flag.
Back to top
View user's profile Send private message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Wed Mar 30, 2005 5:37 am    Post subject: Reply with quote

Hmm, I don't have an option "real-root" in /etc/grub/grub.conf. My grub.conf looks like this:
Code:
# /boot/grub/grub.conf
#
# By default boot the first entry
default 0
# Fallback to the second entry
fallback 1
# Boot automatically after 10 seconds
timeout 10
# Set the wallpaper for the GRUB bootloader
splashimage=(hd1,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux (2.6.11-gentoo-r4) (framebuffer) (hdb)
root (hd1,0)
kernel (hd1,0)/boot/vmlinuz-2.6.11-gentoo-r4 root=/dev/hdb5 video=vesafb:ywrap,mtrr,1280x1024-64@85

title=Gentoo Linux (2.6.10-gentoo-r6) (framebuffer)
root (hd1,0)
kernel (hd1,0)/boot/vmlinuz-2.6.10-gentoo-r6 root=/dev/hdb5 video=vesafb:ywrap,mtrr,1280x1024-64@85

title=Gentoo Linux (2.6.10-gentoo-r6) (framebuffer)
root (hd1,0)
kernel (hd1,0)/boot/vmlinuz-2.6.10-gentoo-r6.old root=/dev/hdb5 video=vesafb:ywrap,mtrr,1280x1024-64@85


So I have root=/dev/hdb5, but I don't have real-root set anywhere. Is there a difference?

Thanks
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Mar 30, 2005 5:46 am    Post subject: Reply with quote

There is no point in that affirmation since your system boot and the partitions are mounted. Grub only interferes until you load the kernel, once the kernel is loaded and the /boot partition accessed grub goes out. So it is not a grub problem for sure.
Back to top
View user's profile Send private message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Wed Mar 30, 2005 5:48 am    Post subject: Reply with quote

Here is the /etc/fstab I'm using:
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.

# <fs>             <mountpoint>    <type>     <opts>            <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/BOOT      /boot      ext2      noauto,noatime      1 1
#/dev/ROOT      /      xfs      noatime         0 0
#/dev/SWAP      none      swap      sw         0 0
#/dev/cdroms/cdrom0   /mnt/cdrom   iso9660      noauto,ro      0 0
#/dev/fd0      /mnt/floppy   auto      noauto         0 0
/dev/hdb1               /boot           ext2            noauto                  1 2
/dev/hdb5               /               ext2            noatime                 1 1
/dev/hdb6               none            swap            sw                      0 0
/dev/hdb7               /var            ext2            noatime                 1 2
/dev/hdb8               /usr            ext2            noatime,ro              1 2
/dev/hdb9               /home           ext2            noatime                 1 2
tmpfs         /tmp      tmpfs      defaults,nosuid,noexec,size=256M,mode=1777   0 0
/dev/fd0                /mnt/floppy     auto            noauto,user             0 0

# NOTE: The next line is critical for boot!
proc         /proc      proc      defaults      0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none         /dev/shm   tmpfs      defaults      0 0

/dev/hdd                /media/cdrecorder       auto    exec,user,noauto,managed 0 0
/dev/hdc                /media/cdrom            auto    exec,user,noauto,managed 0 0


This is identical to the fstab for the old drive except that I've changed the devices from hdaX to hdbX, so I'm pretty sure it should work. I'm researching the real-root option right now so I'm not sure if that's the source of my problems or not.

Thanks
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Mar 30, 2005 5:53 am    Post subject: Reply with quote

Yes, as you already said that fstab is ok. ¿??
Back to top
View user's profile Send private message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Wed Mar 30, 2005 6:08 am    Post subject: Reply with quote

Well, I have no idea what changed, but now I am able to get it to boot up. It was as if nothing had ever been wrong with it in the first place. Oh well, thanks for the help, I appreciate you taking the time to review my configuration. thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum