On Fri, 2015-07-17 at 06:55 +0300, Andrei Borzenkov wrote:
> В Wed, 15 Jul 2015 23:03:02 +0800
> sean <x...@suse.com> пишет:
> 
> > Hi All:
> >     I am trying to test the latest upstream kernel, But i encounter a 
> > strange issue about systemd.
> > When the "systemd" extracted from initrd image mounts the real root file 
> > system "hda.img" on "/sysroot" and changes root to the new directory,  it 
> > can not found "/sbin/init" and "/bin/sh".
> > In fact, These two files exist in the "hda.img".
> > How to debug this issue?
> > Why does not it enter emergency mode?
> > If enter emergency mode, maybe this issue become easy.
> > 
> 
> You can stop in dracut just before switch root step and examine
> environment. At this point root should already be mounted.
Thanks very much!
How to stop the booting process before switch root?
> 
> > qemu command line:
> > qemu-kvm -D /tmp/qemu-kvm-machine.log -m 1024M -append 
> > "root=UUID=20059b62-2542-4a85-80cf-41da6e0c1137 rootflags=rw 
> > rootfstype=ext4 debug debug_objects console=ttyS0,115200n8 console=tty0
> >  rd.debug rd.shell=1 log_buf_len=1M systemd.unit=emergency.target 
> > systemd.log_level=debug systemd.log_target=console" -kernel 
> > ./qemu_platform/bzImage -hda ./qemu_platform/hda.img 
> > -initrd ./qemu_platform/initrd-4.1.0-rc2-7-desktop+ -device 
> > e1000,netdev=network0 -netdev user,id=network0 -serial 
> > file:/home/sean/work/source/upstream/kernel.org/ttys0.txt
> > 
> ...
> > 
> > sean@linux-dunz:~/work/source/upstream/kernel.org/qemu_platform> sudo mount 
> > -o loop ./hda.img ./hda
> > sean@linux-dunz:~/work/source/upstream/kernel.org/qemu_platform> ls -l 
> > ./hda/sbin/init
> > lrwxrwxrwx 1 sean users 26 Jul 14 22:49 ./hda/sbin/init -> 
> > ../usr/lib/systemd/systemd
> 
> Do you have separate /usr?
No, Only one disk partition.
> 
> > sean@linux-dunz:~/work/source/upstream/kernel.org/qemu_platform> ls -l 
> > ./hda/bin/sh
> > lrwxrwxrwx 1 sean users 4 Oct 26  2014 ./hda/bin/sh -> bash
> > 
> > sean@linux-dunz:~/work/source/upstream/kernel.org/qemu_platform> lsinitrd 
> > ./initrd-4.1.0-rc2-7-desktop+ |grep "sbin\/init"
> > -rwxr-xr-x   1 root     root         1223 Nov 27  2014 sbin/initqueue
> > lrwxrwxrwx   1 root     root           26 Jul 14 21:00 sbin/init -> 
> > ../usr/lib/systemd/systemd
> > sean@linux-dunz:~/work/source/upstream/kernel.org/qemu_platform> lsinitrd 
> > ./initrd-4.1.0-rc2-7-desktop+ |grep "bin\/sh"
> > lrwxrwxrwx   1 root     root            4 Jul 14 21:00 bin/sh -> bash
> > 
> > 
> > 
> 
> 

-- 
Sean. XinRong Fu
Dedicate System Engineer
SUSE
x...@suse.com
(P)+86 18566229618


line

SUSE



_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to