Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Moving gentoo to new drive - init does not start.
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
j000
n00b
n00b


Joined: 25 Apr 2015
Posts: 8

PostPosted: Sat Feb 13, 2016 4:12 pm    Post subject: [Solved] Moving gentoo to new drive - init does not start. Reply with quote

So I decided to get ssd. Everything went well, I used rsync -axXA --exclude=/lost+found to copy files to new /boot and /.
Grub2 starts, kernel starts and then nothing happens.
I tried adding init=/sbin/init to kernel command line, but it did not help. Adding init=/this_not_exists will cause kernel to panic. Starting using old drive (but same /boot partition) works fine.
This is what I get from netconsole: http://pastebin.com/fZFfF4kT
Probably it's something stupid, but what did I do wrong? Or what have I forgot?


Last edited by j000 on Sun Feb 14, 2016 12:05 am; edited 1 time in total
Back to top
View user's profile Send private message
chsawinski
n00b
n00b


Joined: 04 Sep 2015
Posts: 1
Location: Germany

PostPosted: Sat Feb 13, 2016 9:42 pm    Post subject: mirroring a device Reply with quote

another way of "mirroring" a device (with all MBR-Boot-Records) is to use g4l or clonezilla, starting from CD or USB-Drive, availible i.e. on a parted-magic-boot-cd. i think you may missed some files or their perm.
_________________
Have fun have Backups
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Sat Feb 13, 2016 10:41 pm    Post subject: Reply with quote

What happens if you use init=/bin/bash, or whatever shell you have there? Maybe you would be able to have a look _into_ the issue this way.
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Sat Feb 13, 2016 10:48 pm    Post subject: Reply with quote

I have done this task many times.

This is my checklist:
- mount target system
- bind dev sys proc into target
- chroot into system
- mount -a
- kernel cmdline still fitting?
- etc/fstab still fitting? (thing UUID or LABEL)
- grub config still fitting?
- grub2-install /dev/sda
- grub2-mkconfig -o /boot/grub2/grub.cfg
- rebuild initramfs with genkernel or whatever
- reboot

If it doesnt boot, there are some possibilities:
- MBR/GPT Type not in the kernel
- harddrive module not in the kernel/initramfs (ahci, whatever)
- FS not in the kernel or initramfs
- wrong rootfs cmdline

In your case, i assume your initramfs is not fitting anymore or the table grub2-install creates doesnt fit anymore. Maybe your copy of the HDD is faulty. I recommend app-backup/fsarchiver or classic tar.

Good luck! 8)
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://portage.schorsch-tech.de
git clone https://portage.schorsch-tech.de/portage.git
Back to top
View user's profile Send private message
j000
n00b
n00b


Joined: 25 Apr 2015
Posts: 8

PostPosted: Sat Feb 13, 2016 11:04 pm    Post subject: Reply with quote

Yes, I can start shell. Apparently there is nothing in /dev, /proc and /sys. Rootfs is mounted read-only, but I can mount -o remount,rw /.
Will try rebuilding everything in chroot.
----------
I wiped system partition, created new, rsync -axXAH / /tmp/new. Inside chroot I rebuilt kernel, reinstalled grub, and made new grub2-mkconfig, as usual per kernel update. I double-checked fstab.
My initramfs only updates cpu microcode, I also have CONFIG_INITRAMFS_SOURCE="/usr/share/v86d/initramfs". That's what inside it:
Code:
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
nod /dev/tty1 0600 0 0 c 4 1
nod /dev/zero 0600 0 0 c 1 5
nod /dev/mem 0600 0 0 c 1 1
dir /root 0700 0 0
dir /sbin 0755 0 0
file /sbin/v86d /sbin/v86d 0755 0 0

But nothing should change when I connect another drive via another sata port, right? Shell starting means kernel sees that new drive and it is able to read from filesystem.
Also, I tried starting from old /boot and passing /dev/sda4 to kernel, same results. Starting from new /boot and passing /dev/sdb4 to kernel starts old system, no problems.
Right now I lent my cd drive to a friend and my pc will not boot from usb, but after weekend I will be able to try clean install.
Back to top
View user's profile Send private message
j000
n00b
n00b


Joined: 25 Apr 2015
Posts: 8

PostPosted: Sun Feb 14, 2016 12:08 am    Post subject: Reply with quote

I marked it as solved, because I'm writing from new drive :)
From this topic: All it needed was CONFIG_DEVTMPFS_MOUNT=y. I do not have it set in my old kernel. Double checked that.
So only question is: Why is it needed now with ssd, and wasn't needed with hdd?
Back to top
View user's profile Send private message
Syl20
Guru
Guru


Joined: 04 Aug 2005
Posts: 564
Location: France

PostPosted: Mon Feb 15, 2016 12:49 pm    Post subject: Reply with quote

Maybe because your old /dev was not empty ? So the needed device files before (e)udev starts were already present in your HDD, but not in your SSD.
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