[Fedora 9] switch root: mount failed: no such file or directory [message #33455] |
Wed, 15 October 2008 08:27 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
kipu
Messages: 4 Registered: October 2008
|
Junior Member |
|
|
Hi everybody,
I have a problem when installing OpenVZ on Fedora 9. See details below:
# rpm -qa | grep ovz
ovzkernel-2.6.18-92.1.1.el5.028stab057.2.i686
# fdisk -l
Disk /dev/sda: 7516 MB, 7516192768 bytes
255 heads, 63 sectors/track, 913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00007492
Device Boot Start End Blocks Id System
/dev/sda1 * 1 191 1534176 83 Linux
/dev/sda2 192 256 522112+ 82 Linux swap / Solaris
/dev/sda3 257 913 5277352+ 83 Linux
# cat /etc/fstab
/dev/sda1 / ext3 defaults 1 1
/dev/sda3 /vz ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sda2 swap swap defaults 0 0
# ls /boot
config-2.6.18-92.1.1.el5.028stab057.2 initrd-2.6.25-14.fc9.i686.img System.map-2.6.25-14.fc9.i686
config-2.6.25-14.fc9.i686 initrd-openvz-no-scsi.img vmlinux-2.6.18-92.1.1.el5.028stab057.2
efi new-initrd.img vmlinuz-2.6.18-92.1.1.el5.028stab057.2
grub symvers-2.6.18-92.1.1.el5.028stab057.2.gz vmlinuz-2.6.25-14.fc9.i686
initrd-2.6.18-92.1.1.el5.028stab057.2.img System.map-2.6.18-92.1.1.el5.028stab057.2
# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title OpenVZ (2.6.18-92.1.1.el5.028stab057.2)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-92.1.1.el5.028stab057.2 ro root=/dev/sda3 vga=0x303
initrd /boot/initrd-openvz-no-scsi.img
title Fedora (2.6.25-14.fc9.i686)
root (hd0,0)
kernel /boot/vmlinuz-2.6.25-14.fc9.i686 ro root=UUID=829512e2-91e7-4e67-9f92-24eced8ee9a3 vga=0x303
initrd /boot/initrd-2.6.25-14.fc9.i686.img
# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
#
# We do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
The initrd-openvz-no-scsi.img is created by command:
# mkinitrd --omit-scsi-modules -f /boot/initrd-openvz-no-scsi.img 2.6.18-92.1.1.el5.028stab057.2
But the follow messages appear when I reboot:
Quote: |
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Booting has failed.
|
I have tried:
- modify initrd image follow this guide: http://wiki.openvz.org/Modifying_initrd_image
- Open init file and change "mount /sysroot" to:
mount -t ext3 -o defaults,ro /dev/sda3 /sysroot
- replace initrd-openvz-no-scsi.img with new-initrd.img in menu.lst
but the above messages still appear and I cannot boot to OpenVZ.
Anyone help me? Thank in advance.
[Updated on: Wed, 15 October 2008 08:35] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: [Fedora 9] switch root: mount failed: no such file or directory [message #33478 is a reply to message #33477] |
Thu, 16 October 2008 07:19 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
maratrus
Messages: 1495 Registered: August 2007 Location: Moscow
|
Senior Member |
|
|
Hi,
- please try to make openvz-initrd without "--omit-scsi-modules" option.
- are there any errors before the "cannot open root device" message. If all the modules are loaded correctly?
- could you please show init scripts from fc9-initrd and openvz-initrd images and also make sure that inside initrd image /lib directory contains modules that are matched to openvz kernel (sd_mod for example).
Could you also show /lib directory inside openvz-initrd image.
- could you please try in menu.lst file change root=/dev/sda3 to root=UUID=829512e2-91e7-4e67-9f92-24eced8ee9a3.
|
|
|