:: Re: [Dng] Fwd: [dng] vdev status up…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Anto
Date:  
À: Jude Nelson
CC: dng@lists.dyne.org
Sujet: Re: [Dng] Fwd: [dng] vdev status update
On 16/04/15 21:49, Jude Nelson wrote:
> Hi Anto,
>
> Sorry for the late reply; I had been super busy with work over the
> last 24 hours.


Don't worry, Jude. You are not working for anyone or any companies who
breath on your neck to complete vdev tomorrow, are you? :)

>
> Thanks for sending me the picture :)


You are welcome. The quality of the picture is bad as I was quite hungry
that night and I wanted to go out. So I just took it with any camera
around me. I will try to get a better picture next time. Or it would
better if you could let me know how to log that kind of early stage boot
messages, possibly via Ethernet or USB interfaces (if that would be
possible at all), so that you can have a complete error messages.

>
> The "rc = -17" error code means that the device exists (i.e. it's
> -EEXIST). If you look in /dev from the initramfs, you should see a
> bunch of device files.
>
> The "rc = -2" at the end is a minor bug--vdevd didn't create
> /dev/pts/ptmx, so it couldn't look up any metadata under /dev/vdev for
> it (i.e. rc == -2 is -ENOENT). That by itself shouldn't prevent root
> from mounting, though.
>
> Do you have devtmpfs mounted on /dev? That could be the reason it
> doesn't boot. At this time, if a device file exists that vdevd did
> not create, vdevd won't run any helper scripts for it when it
> processes it. If your root partition device file exists (e.g.
> /dev/sda1) since e.g. devtmpfs created it, and your /etc/fstab
> identifies your root device partition using a persistent path (e.g.
> /dev/disk/by-uuid/... or the like), vdevd won't generate the
> persistent path, since that's done by the helper scripts for
> /dev/sda1. As such, the script routines that parse /etc/fstab won't
> find the root device, and the initramfs init will abort and drop you
> into a shell.


I am not really sure if I understood what you explained. I don't think I
have devtmpfs on my PC when I use the working initrd. The one mounted on
/dev with the type of devtmpfs is udev. Here are the output of mount and
the content of my fstab.

root@hp8530w:~# uname -a
Linux hp8530w 3.18.11-1v1-hp8530w #1 SMP Wed Apr 15 00:49:22 CEST 2015 
x86_64 GNU/Linux
root@hp8530w:~#
root@hp8530w:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs 
(rw,relatime,size=10240k,nr_inodes=492536,mode=755)
devpts on /dev/pts type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=401084k,mode=755)
/dev/disk/by-uuid/c0e1e620-5636-48f2-90dd-4d246d58b815 on / type ext4 
(rw,relatime,errors=remount-ro,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1641020k)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda2 on /home type ext4 (rw,relatime,data=ordered)
root@hp8530w:~#
root@hp8530w:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type> <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=c0e1e620-5636-48f2-90dd-4d246d58b815 /               ext4 
errors=remount-ro 0       1
# /home was on /dev/sda2 during installation
UUID=5be7af77-0d10-4685-989f-1004b1eabec8 /home           ext4 
defaults        0       2
# swap was on /dev/sda3 during installation
UUID=3a37a27d-84cc-4d06-9920-5419bb4ccbae none            swap 
sw              0       0
# /dev/sr0        /media/cdrom0   udf,iso9660 user,noauto 0       0
/dev/cdrom1        /media/cdrom0   udf,iso9660 user,noauto 0       0
# /dev/cdrom        /media/cdrom0   udf,iso9660 user,noauto 0       0
root@hp8530w:~#


> For those who don't know, devtmpfs is basically a no-frills devfs that
> modern udev now requires to be mounted to work correctly (i.e.
> devtmpfs makes the device files these days, not udev). vdevd is
> currently not compatible with devtmpfs, since it expects to create all
> the device files itself. I'll update the Linux port to check of
> devtmpfs is mounted before running, so vdevd will still run the helper
> scripts even if devtmpfs created the device files already.
>
>     I am not sure if this would be relevant. I am using file-rc
>     instead of sysv-rc, so I didn't actually have any /etc/rc?.d
>     directories. After the installation of the "example", /etc/rcS.d
>     directory and S02vdev link under it got created. It could possibly
>     be a problem later on, but I think I will worry about that (add it
>     into /etc/runlevel.conf) after the boot process can reach it.

>
>
> That is relevant! I had assumed in the Makefile that the user is
> using sysv-rc, with the /etc/rc*.d/ directories.
>
> I'm not familiar with using file-rc, but I don't think it's involved
> in the initramfs boot process (at least, not directly). That's all
> controlled by the files in /usr/share/initramfs-tools/. However, I'd
> be happy to patch the Makefile in example/ to install the vdev init
> script correctly for file-rc users :) I just need to know what to
> do--could you maybe send me a small script that would achieve this?
>
> Thanks again,
> Jude
>


A small script? I am just a user so I didn't create any scripts for
file-rc. :) Perhaps you can find the scripts that you are after on
http://ftp.debian.org/debian/pool/main/f/file-rc/file-rc_0.8.15_all.deb,
as that is the one I use and I don't modify anything.

root@hp8530w:~# apt-cache policy file-rc
file-rc:
   Installed: 0.8.15
   Candidate: 0.8.15
   Version table:
  *** 0.8.15 0
         870 http://ftp.debian.org/debian/ wheezy/main amd64 Packages
         100 /var/lib/dpkg/status
root@hp8530w:~#


Let's just worry about file-rc and sysv-rc later on after we can pass
initramfs. How about that?

I have a plan this week end to dust off my Mini-ITX PC to be used for
properly testing your vdev (or any Devuan packages), instead of using my
notebook. So I can use sysv-rc and any packages that will make you
easier to develop your vdev. I will post that on different topic later on.

Cheers,

Anto