Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Woes upgrading to Advanced Format Drive [SOLVED]
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
Tony0945
Guru
Guru


Joined: 25 Jul 2006
Posts: 317

PostPosted: Wed Apr 23, 2014 12:59 am    Post subject: Woes upgrading to Advanced Format Drive [SOLVED] Reply with quote

I bought a WD250 Velociraptor to replace a WD320 RE drive. The new drive is Advanced Format with 4096 byte sectors. The old drive has 512 byte sectors and was cloned from it's predecessor with dd.

After booting sysrescuecd and creating the new partitions with 'parted -a optimal' I followed a tip from the web and copied the files with 'cp -afr /<old root> /<new root>' and the like for the boot partition. I then installed legacy grub per the handbook. When I rebooted, a grub prompt appeared. After hours of web searching and re-trials, I finally blew away the ext4 /boot partition and created an ext3 partition and copied files again. It got a little farther and I downgraded again to ext2. Now the partitions were the same type and the good work of 'mkfs.ext4 -b 4096' was gone for the boot partition. I went through the same steps of booting the CD, copying files and chrooting to install grub. Now when I boot I get to "waiting for uevents' (eudev, right?), a long wait, rapid lines with red stars in front, the screen flashes clear and 'This is (none)' appears on the screen. I went through the procedure AGAIN and edited /etc/rc.conf to be interactive. I then rebooted and started pressing the "i" key but the same thing happened. There is nothing for today in /var/log/messages that I can see from the chroot environment. I tried adding 'single_user=1' to the grub line but, you guessed it, the exact same thing happened.

Is legacy grub (0.97) having trouble with the /boot partition starting 1 MiB into the disk? Should I upgrade to grub2? I hate to because I don't understand the syntax and apparently after every kernel rebuild you have to run some sort of update program like we used to do with LILO. Is the Gentoo kernel having trouble with 4096 byte sectors? I tried running genkernel in the chroot and somewhere in busybox it got lost and stopped running without exiting.

Some one must have upgraded a drive from 512 to 4096. How did you do it, please? Should I re-install stage3 and a portage snapshot, copy my /root /etc and /home from the old drive, run "emerge -e --keep-going world", rebuild the kernel, reinstall grub and reboot? Last time I ran 'emerge -e world' it ran for 19 hours and that was on a faster machine.


Last edited by Tony0945 on Wed Apr 23, 2014 9:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9124

PostPosted: Wed Apr 23, 2014 1:40 am    Post subject: Reply with quote

I had no problems running Gentoo on a 4K sector drive, though that drive has since died. I aligned my partitions to 1MB. I believe Grub1 worked fine for that using ext3. If you got to the point of running udev, then your bootloader is no longer an issue. Something else is wrong with how you copied the system to its new drive. For each line with a red star, you need to fix the associated error. Start with the topmost failure. Sometimes a failure early on causes other failures later. Your hostname of (none) probably indicates a problem with /etc/conf.d/hostname.
Back to top
View user's profile Send private message
Tony0945
Guru
Guru


Joined: 25 Jul 2006
Posts: 317

PostPosted: Wed Apr 23, 2014 2:19 am    Post subject: Reply with quote

I'll check /etc/conf.d/hostname. I can do that from sysrecuecd.

I can't read the red star items because they come too fast and then the screen blanks instead of scrolling. Is there anyway to fix that?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6710
Location: Goose Creek SC

PostPosted: Wed Apr 23, 2014 5:14 am    Post subject: Reply with quote

suggest: boot a sysresccd, backup your files, fsck the gentoo partitions, mount the gentoo partitions,run the code's below looking for the quote's as a result
Code:
grep -i "CONFIG_DEVTMPFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DEVTMPFS=y

Code:
grep -i "CONFIG_DEVTMPFS_MOUNT=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DEVTMPFS_MOUNT=y

Code:
grep -i "CONFIG_FSNOTIFY=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_FSNOTIFY=y

Code:
grep -i "CONFIG_DNOTIFY=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DNOTIFY=y

Code:
grep -i "CONFIG_INOTIFY_USER=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_INOTIFY_USER=y

Code:
grep -i "CONFIG_NET=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_NET=y

Code:
grep -i "CONFIG_PROC_FS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_PROC_FS=y

Code:
grep -i "CONFIG_SIGNALFD=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_SIGNALFD=y

Code:
grep -i "CONFIG_SYSFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_SYSFS=y

Code:
grep -i "CONFIG_SYSFS_DEPRECATED is not set" /mnt/gentoo/usr/src/linux/.config

Quote:
# CONFIG_SYSFS_DEPRECATED is not set

Code:
grep -i 'CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"' /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"

Code:
grep -i "CONFIG_BLK_DEV_BSG=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_BLK_DEV_BSG=y

Code:
grep -i "CONFIG_TMPFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS=y

Code:
grep -i "CONFIG_TMPFS_POSIX_ACL=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS_POSIX_ACL=y

Code:
grep -i "CONFIG_TMPFS_XATTR=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS_XATTR=y

Code:
ls /mnt/gentoo/dev

Quote:
null console

[/quote] recommend entering the chroot, editing menuconfig and recompiling and recopying the kernel if results are different.
Code:
rc-update show
look for
Quote:
udev | sysinit
udev-mount | sysinit
if not present add the entries.

dmesg should show the messages.
you may have lost a lot of symlinks in the copy process
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Tony0945
Guru
Guru


Joined: 25 Jul 2006
Posts: 317

PostPosted: Wed Apr 23, 2014 3:25 pm    Post subject: Reply with quote

Thank you. The boot problem was due to a line in /etc/fstab that mounted a fourth partition as backup. Init went crazy when it couldn't mount the partition. I had already editted fstab to comment out mounting of the second (video) drive. I found this by recording the boot screen with a cell phone camcorder and playing it back, pausing just before the screen blanks. I mention this because it seems a usefull technique. The video, or still shots from it, can be uploaded to show the exact screen.

After fixing fstab, I was able to boot but couldn't login graphically because various hidden files were symlinked to themselves. command line login worked ok. I started deleting and copying from the command line. It seemed a monumental job. I'm now in the process of booting sysrescuecd (BTW, it comes up really fast from a usb stick) and using tar piped into tar to recopy the \home partition. I seem to have the syntax wrong and it's copying the root partition. It's been running for an hour and half and copying /usr right now. I'm going to leave the boot partition alone because it has no hidden files and is working.
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 913
Location: Here and Away Again

PostPosted: Wed Apr 23, 2014 8:16 pm    Post subject: ><)))°€ Reply with quote

Teegrins, Tony0945!


With regards to the screen being blankified, adding the --noclear option into /etc/inittab should change that.

Something like this:

Code:
# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux --noclear

Furthermore, within /etc/rc.conf lies the following:

Code:
# rc_logger launches a logging daemon to log the entire rc process to
# /var/log/rc.log
# NOTE: Linux systems require the devfs service to be started before
# logging can take place and as such cannot log the sysinit runlevel.
rc_logger="YES"

I hope this helps a bit at least!
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
Tony0945
Guru
Guru


Joined: 25 Jul 2006
Posts: 317

PostPosted: Wed Apr 23, 2014 9:38 pm    Post subject: Reply with quote

Yes it does, Chiitoo. In fact, I had the logger on, but I thought it logged to /var/log/messages. In fact, it logs to /var/log/rc.log. I saw that after I got it up and running, otherwise I could have examined the log from sysrescuecd.
Back to top
View user's profile Send private message
Tony0945
Guru
Guru


Joined: 25 Jul 2006
Posts: 317

PostPosted: Wed Apr 23, 2014 9:46 pm    Post subject: Reply with quote

Found the right way to copy. Forget cp -a. Here's the actual commands that I gave, file permissions were preserved. Took about an hour and a half. He had a lot of large files. The other users only took about five minutes each.

Quote:

root@sysresccd /root % mkdir /mnt/new
root@sysresccd /root % mkdir /mnt/old
root@sysresccd /root % mount /dev/sdb3 /mnt/old
root@sysresccd /root % mount /dev/sda3 /mnt/new
root@sysresccd /root % (cd /mnt/old/home/jacob && tar -cvpf - .) | (cd /mnt/new/home/jacob && tar -xvf -)


BTW, the ext2 partition that I made from gparted were optimal as later confirmed by parted. This consumed a lot of time, but hdparm shows its worth it. The old WD3200YS drive (made in May 2006! and still no errors) read at 65 MB/sec and the WD250HHTZ reads at 195 MB/sec!
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