Hello, I''m running xen 3.0 with the following conf. # Configuration file template for Ofelia CF XEN agent # # Kernel + memory size # kernel = ''/boot/vmlinuz-2.6.32-5-xen-amd64'' ramdisk = ''/boot/initrd.img-2.6.32-5-xen-amd64'' extra = ''console=hvc0 xencons=tty'' memory = ''1024'' #CPUS vcpus = 1 # # Disk device(s). # root = ''/dev/xvda1 ro'' disk = [ ''file:/opt/ofelia/vt_manager/src/python/agent/cache/vms/f3c7d44b-1d6e-4cf5-8809-455e86e7c116/1c4eaccc-0a5a-427c-9bd9-1a57182b5f74/VM6.img,xvda1,w'', ''file:/opt/ofelia/vt_manager/src/python/agent/cache/vms/f3c7d44b-1d6e-4cf5-8809-455e86e7c116/1c4eaccc-0a5a-427c-9bd9-1a57182b5f74/VM6_swap.img,xvda2,w'', ] # # Hostname # name = ''VM6'' #UUID uuid = ''2a27c576-1787-4823-a996-47df17d577d0'' # # Networking # #dhcp = ''dhcp'' dhcp=''off'' ##Interfaces #vif = [''script=noscript, bridge=test2, mac=00:00:00:00:aa:03'',] vif = [''bridge=test2, mac=00:00:00:00:aa:03'',] # # Behaviour # on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' And, when I launch xm create command, I see the following messages from console. [ 0.184731] Initalizing network drop monitor service [ 0.184787] Freeing unused kernel memory: 604k freed [ 0.184943] Write protecting the kernel read-only data: 4336k Loading, please wait... [ 0.214238] udev[46]: starting version 164 [ 0.252966] Initialising Xen virtual ethernet driver. [ 0.282649] blkfront: xvda1: barriers enabled [ 0.291046] blkfront: xvda2: barriers enabled Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... done. [ 0.528786] kjournald starting. Commit interval 5 seconds [ 0.528804] EXT3-fs: mounted filesystem with ordered data mode. Begin: Running /scripts/local-bottom ... done. done. Begin: Running /scripts/init-bottom ... done. Target filesystem doesn''t have requested /sbin/init. No init found. Try passing init= bootarg. BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash) Enter ''help'' for a list of built-in commands. /bin/sh: can''t access tty; job control turned off (initramfs) looks like the guest images /sbin/init is not executed. looking for help :) Oh, and by the way, the guest image does not have bootloader and could that be a problem? Also, how can I install a bootloader to the guest image? best, - Jaeyong _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Alexandre Kouznetsov
2012-Jul-23 17:24 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
Hello. Mount your VM6.img as loop device within Dom0, check if it is consistent and /sbin/init is there. Also, within BusyBox you can check what is mounted as "/" and if it''s readable. El 23/07/12 05:50, jaeyong yoo escribió:> Oh, and by the way, the guest image does not have bootloader and could > that be a problem?Should not. Xen guest VM without kernel and/or bootloader is a normal case. Although, usually you wish to install the same kernel image (via your guest''s regular package managing system), as on your Dom0, in order to have the right /lib/modules.> Also, how can I install a bootloader to the guest image?Normally you don''t install bootloader in a guest VM, unless it''s HVM (your is PV). It is possible to boot the guest VM using kernel stored in guest''s filesystem, but the bootloader will not reside within guest image. Instead, in case of Xen, you use a small program called pygrub within Dom0. It reads the image, extract the config, the kernel and initrd, then boot them. Check pygrub''s documentation, usually it works fine. On the low level, the booting process is pretty much the same as if you were using kernel and initrd from Dom0 filesystem. The difference is that you don''t actually have the needed kernel image in Dom0, it''s extracted on the fly from DomU''s image just before booting. Greetings. -- Alexandre Kouznetsov
Alexandre Kouznetsov
2012-Jul-23 20:31 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
El 23/07/12 14:26, Luceo Astrum escribió: > Usually in my experience no /sbin/init means that you''ve mounted the > wrong partition on root. > > Check for root= on kernel line (grub / syslinux configuration) > and / in fstab. Agree, very common couse. That''s why i suggested Jaeyong to inspect his root FS first. His config file clearly states "root = ''/dev/xvda1 ro''". Although, sounds like a good idea to check "dmesg" output on initrd busybox prompt, to find out with that parameters was the kernel actually called. Greetings. -- Alexandre Kouznetsov
jaeyong yoo
2012-Jul-24 02:28 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
Thanks Alexandre, I check dmesg at initramfs and it looks /dev/xvda1 is correctly applied. This is very werid. (initramfs) dmesg [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.32-5-xen-amd64 (Debian 2.6.32-41) ( ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Jan 16 20:48:30 UTC 2012 [ 0.000000] Command line: root=/dev/xvda1 ro [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] ACPI in unprivileged domain disabled [ 0.000000] released 0 pages of unused memory Also, there is /sbin/init. So, it is not about the file missing. (initramfs) ls /root/sbin/init -l -rw------- 1 1000 1000 36992 Jan 1 2011 /root/sbin/init I also highly suspect whether root = ''/dev/xvda1 ro is correctly applied. I think the root file system is not mounted as the following command shows this at initramfs. (initramfs) df Filesystem 1K-blocks Used Available Use% Mounted on df: /proc/mounts: No such file or directory Is the above right to check the root file system mounted? Best, Jaeyong On Tue, Jul 24, 2012 at 5:31 AM, Alexandre Kouznetsov <alk@ondore.com>wrote:> El 23/07/12 14:26, Luceo Astrum escribió: > > Usually in my experience no /sbin/init means that you''ve mounted the > > wrong partition on root. > > > > Check for root= on kernel line (grub / syslinux configuration) > > and / in fstab. > > Agree, very common couse. That''s why i suggested Jaeyong to inspect his > root FS first. His config file clearly states "root = ''/dev/xvda1 ro''". > > Although, sounds like a good idea to check "dmesg" output on initrd > busybox prompt, to find out with that parameters was the kernel actually > called. > > > Greetings. > > -- > Alexandre Kouznetsov > > ______________________________**_________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Jeff Sturm
2012-Jul-24 03:22 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
> From: xen-users-bounces@lists.xen.org [mailto:xen-users-bounces@lists.xen.org] On Behalf Of jaeyong yoo > Sent: Monday, July 23, 2012 10:29 PM > > Also, there is /sbin/init. So, it is not about the file missing. > > (initramfs) ls /root/sbin/init -l > -rw------- 1 1000 1000 36992 Jan 1 2011 /root/sbin/initNo execute permission? -Jeff
jaeyong yoo
2012-Jul-24 03:29 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
Ah! that''s it!!! Now the problem solved. I feel so stupid. Thanks a lot all of you :) Jaeyong On Tue, Jul 24, 2012 at 12:22 PM, Jeff Sturm <jeff.sturm@eprize.com> wrote:> > From: xen-users-bounces@lists.xen.org [mailto: > xen-users-bounces@lists.xen.org] On Behalf Of jaeyong yoo > > Sent: Monday, July 23, 2012 10:29 PM > > > > Also, there is /sbin/init. So, it is not about the file missing. > > > > (initramfs) ls /root/sbin/init -l > > -rw------- 1 1000 1000 36992 Jan 1 2011 /root/sbin/init > > No execute permission? > > -Jeff > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
jaeyong yoo
2012-Jul-24 04:01 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
I''ve encountered another problem [?] It says "run-init: /sbin/init: Permission denied" Here is the log. Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... done. [ 0.524394] kjournald starting. Commit interval 5 seconds [ 0.524412] EXT3-fs: mounted filesystem with ordered data mode. Begin: Running /scripts/local-bottom ... done. done. Begin: Running /scripts/init-bottom ... done. run-init: /sbin/init: Permission denied [ 0.568553] Kernel panic - not syncing: Attempted to kill init! [ 0.568565] Pid: 1, comm: run-init Not tainted 2.6.32-5-xen-amd64 #1 [ 0.568572] Call Trace: [ 0.568585] [<ffffffff8130c037>] ? panic+0x86/0x143 [ 0.568596] [<ffffffff8100e635>] ? xen_force_evtchn_callback+0x9/0xa [ 0.568605] [<ffffffff8100ecf2>] ? check_events+0x12/0x20 [ 0.568614] [<ffffffff8100e635>] ? xen_force_evtchn_callback+0x9/0xa [ 0.568622] [<ffffffff8100ecf2>] ? check_events+0x12/0x20 [ 0.568631] [<ffffffff8130de12>] ? _spin_lock_irq+0x7/0x22 [ 0.568640] [<ffffffff8130de94>] ? _write_lock_irq+0x7/0x16 [ 0.568649] [<ffffffff81058276>] ? exit_ptrace+0xa7/0x126 [ 0.568658] [<ffffffff8100ecdf>] ? xen_restore_fl_direct_end+0x0/0x1 [ 0.568667] [<ffffffff8105222d>] ? do_exit+0x72/0x6c6 [ 0.568675] [<ffffffff81052946>] ? complete_and_exit+0x0/0x16 [ 0.568683] [<ffffffff81011b63>] ? sysret_check+0x17/0x5a [ 0.568690] [<ffffffff81011b42>] ? system_call_fastpath+0x16/0x1b But, i don''t think it is indeed permission problem because after I tried several settings to give +rx to files I did /$chmod +rx * -R at root directory. Do you have any idea? Best - Jaeyong On Tue, Jul 24, 2012 at 12:29 PM, jaeyong yoo <y.jaeyong@gmail.com> wrote:> Ah! that''s it!!! Now the problem solved. > I feel so stupid. > > Thanks a lot all of you :) > > Jaeyong > > > On Tue, Jul 24, 2012 at 12:22 PM, Jeff Sturm <jeff.sturm@eprize.com>wrote: > >> > From: xen-users-bounces@lists.xen.org [mailto: >> xen-users-bounces@lists.xen.org] On Behalf Of jaeyong yoo >> > Sent: Monday, July 23, 2012 10:29 PM >> > >> > Also, there is /sbin/init. So, it is not about the file missing. >> > >> > (initramfs) ls /root/sbin/init -l >> > -rw------- 1 1000 1000 36992 Jan 1 2011 /root/sbin/init >> >> No execute permission? >> >> -Jeff >> >> >> >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Stephan Seitz
2012-Jul-24 07:56 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
Hi, whatever you''ve done to your domU filesystem, but I assume you crashed it. As seen in your previous post it didn''t only had no execution bit, it also was owned by uid 1000. maybe only a mount issue, but who knows? I also don''t think that a chmod -R +x could count as a solution, as it will leaf your system with a lot more unforseeable file rights. A "permission denied" could also occur if the binary has been compiled for another platform. Anyway, I''ld try to add your disk in question to another, similar domU to have at least your tools running. e.g. by using xm block-attach / xl block-attach cheers, Stephan Am Dienstag, den 24.07.2012, 13:01 +0900 schrieb jaeyong yoo:> I''ve encountered another problem > > It says "run-init: /sbin/init: Permission denied" > > > > Here is the log. > > > Begin: Loading essential drivers ... done. > Begin: Running /scripts/init-premount ... done. > Begin: Mounting root file system ... Begin: > Running /scripts/local-top ... done. > Begin: Running /scripts/local-premount ... done. > [ 0.524394] kjournald starting. Commit interval 5 seconds > [ 0.524412] EXT3-fs: mounted filesystem with ordered data mode. > Begin: Running /scripts/local-bottom ... done. > done. > Begin: Running /scripts/init-bottom ... done. > run-init: /sbin/init: Permission denied > [ 0.568553] Kernel panic - not syncing: Attempted to kill init! > [ 0.568565] Pid: 1, comm: run-init Not tainted 2.6.32-5-xen-amd64 > #1 > [ 0.568572] Call Trace: > [ 0.568585] [<ffffffff8130c037>] ? panic+0x86/0x143 > [ 0.568596] [<ffffffff8100e635>] ? xen_force_evtchn_callback > +0x9/0xa > [ 0.568605] [<ffffffff8100ecf2>] ? check_events+0x12/0x20 > [ 0.568614] [<ffffffff8100e635>] ? xen_force_evtchn_callback > +0x9/0xa > [ 0.568622] [<ffffffff8100ecf2>] ? check_events+0x12/0x20 > [ 0.568631] [<ffffffff8130de12>] ? _spin_lock_irq+0x7/0x22 > [ 0.568640] [<ffffffff8130de94>] ? _write_lock_irq+0x7/0x16 > [ 0.568649] [<ffffffff81058276>] ? exit_ptrace+0xa7/0x126 > [ 0.568658] [<ffffffff8100ecdf>] ? xen_restore_fl_direct_end > +0x0/0x1 > [ 0.568667] [<ffffffff8105222d>] ? do_exit+0x72/0x6c6 > [ 0.568675] [<ffffffff81052946>] ? complete_and_exit+0x0/0x16 > [ 0.568683] [<ffffffff81011b63>] ? sysret_check+0x17/0x5a > [ 0.568690] [<ffffffff81011b42>] ? system_call_fastpath+0x16/0x1b > > > > > But, i don''t think it is indeed permission problem because after I > tried several settings to give +rx to files I did > /$chmod +rx * -R at root directory. > > > Do you have any idea? > > > Best > - Jaeyong > > > On Tue, Jul 24, 2012 at 12:29 PM, jaeyong yoo <y.jaeyong@gmail.com> > wrote: > > Ah! that''s it!!! Now the problem solved. > > I feel so stupid. > > > Thanks a lot all of you :) > > > Jaeyong > > > > > On Tue, Jul 24, 2012 at 12:22 PM, Jeff Sturm > <jeff.sturm@eprize.com> wrote: > > > From: xen-users-bounces@lists.xen.org > [mailto:xen-users-bounces@lists.xen.org] On Behalf Of > jaeyong yoo > > Sent: Monday, July 23, 2012 10:29 PM > > > > > Also, there is /sbin/init. So, it is not about the > file missing. > > > > (initramfs) ls /root/sbin/init -l > > -rw------- 1 1000 1000 36992 Jan 1 > 2011 /root/sbin/init > > > > No execute permission? > > -Jeff > > > > > > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
jaeyong yoo
2012-Jul-24 08:50 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
Oh my god. Somehow it worked. What I have done is following. I mount the image change the /sbin/init to executable (which is meaningless I thought, because it is already executable) and unmount it. Then it works. I really have no idea what''s happening. I guess the filesystem crashed as Stephan said and "magically" it heals itself. Thanks anyway. Jaeyong On Tue, Jul 24, 2012 at 4:56 PM, Stephan Seitz <s.seitz@netzhaut.de> wrote:> ** > Hi, > > whatever you''ve done to your domU filesystem, but I assume you crashed it. > As seen in your previous post it didn''t only had no execution bit, it also > was > owned by uid 1000. maybe only a mount issue, but who knows? > > I also don''t think that a chmod -R +x could count as a solution, as it > will leaf > your system with a lot more unforseeable file rights. > > A "permission denied" could also occur if the binary has been compiled for > another platform. > > Anyway, I''ld try to add your disk in question to another, similar domU to > have > at least your tools running. > > e.g. by using > > xm block-attach / xl block-attach > > cheers, > > Stephan > > > > Am Dienstag, den 24.07.2012, 13:01 +0900 schrieb jaeyong yoo: > > I''ve encountered another problem > > It says "run-init: /sbin/init: Permission denied" > > > > Here is the log. > > > > Begin: Loading essential drivers ... done. > > Begin: Running /scripts/init-premount ... done. > > Begin: Mounting root file system ... Begin: Running /scripts/local-top > ... done. > > Begin: Running /scripts/local-premount ... done. > > [ 0.524394] kjournald starting. Commit interval 5 seconds > > [ 0.524412] EXT3-fs: mounted filesystem with ordered data mode. > > Begin: Running /scripts/local-bottom ... done. > > done. > > Begin: Running /scripts/init-bottom ... done. > > run-init: /sbin/init: Permission denied > > [ 0.568553] Kernel panic - not syncing: Attempted to kill init! > > [ 0.568565] Pid: 1, comm: run-init Not tainted 2.6.32-5-xen-amd64 #1 > > [ 0.568572] Call Trace: > > [ 0.568585] [<ffffffff8130c037>] ? panic+0x86/0x143 > > [ 0.568596] [<ffffffff8100e635>] ? xen_force_evtchn_callback+0x9/0xa > > [ 0.568605] [<ffffffff8100ecf2>] ? check_events+0x12/0x20 > > [ 0.568614] [<ffffffff8100e635>] ? xen_force_evtchn_callback+0x9/0xa > > [ 0.568622] [<ffffffff8100ecf2>] ? check_events+0x12/0x20 > > [ 0.568631] [<ffffffff8130de12>] ? _spin_lock_irq+0x7/0x22 > > [ 0.568640] [<ffffffff8130de94>] ? _write_lock_irq+0x7/0x16 > > [ 0.568649] [<ffffffff81058276>] ? exit_ptrace+0xa7/0x126 > > [ 0.568658] [<ffffffff8100ecdf>] ? xen_restore_fl_direct_end+0x0/0x1 > > [ 0.568667] [<ffffffff8105222d>] ? do_exit+0x72/0x6c6 > > [ 0.568675] [<ffffffff81052946>] ? complete_and_exit+0x0/0x16 > > [ 0.568683] [<ffffffff81011b63>] ? sysret_check+0x17/0x5a > > [ 0.568690] [<ffffffff81011b42>] ? system_call_fastpath+0x16/0x1b > > > > > > But, i don''t think it is indeed permission problem because after I tried > several settings to give +rx to files I did > > /$chmod +rx * -R at root directory. > > > > Do you have any idea? > > > > Best > > - Jaeyong > > > On Tue, Jul 24, 2012 at 12:29 PM, jaeyong yoo <y.jaeyong@gmail.com> > wrote: > > Ah! that''s it!!! Now the problem solved. > > I feel so stupid. > > > > Thanks a lot all of you :) > > > > Jaeyong > > > > On Tue, Jul 24, 2012 at 12:22 PM, Jeff Sturm <jeff.sturm@eprize.com> > wrote: > > > From: xen-users-bounces@lists.xen.org [mailto: > xen-users-bounces@lists.xen.org] On Behalf Of jaeyong yoo > > Sent: Monday, July 23, 2012 10:29 PM > > > > > Also, there is /sbin/init. So, it is not about the file missing. > > > > (initramfs) ls /root/sbin/init -l > > -rw------- 1 1000 1000 36992 Jan 1 2011 /root/sbin/init > > > No execute permission? > > -Jeff > > > > > > > _______________________________________________ > Xen-users mailing listXen-users@lists.xen.orghttp://lists.xen.org/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Alexandre Kouznetsov
2012-Jul-24 15:44 UTC
Re: Target filesystem doesn''t have requested /sbin/init.
El 24/07/12 03:50, jaeyong yoo escribió:> Oh my god. Somehow it worked.Good. Not too good, btw. Usually it''s good to have a clue about what happend, even if the bloblem solves itself. If nothing done it can happen again in the same way, you probably wish to prevent it.> I guess the filesystem crashed as Stephan said and "magically" it heals > itself.Well, it does not work this way. We use fsck to heal filesystem, much more reliable than magic. Even in case it''s already works, as you suspect it was a FS crash, fsck is still strongly recommended. -- Alexandre Kouznetsov