Deploy and Run System in a RamDisk - Could not find by-id representation of ram0

53 views
Skip to first unread message

Jan Robinson

unread,
Feb 9, 2021, 8:07:35 AM2/9/21
to kiwi
Hi All

I am trying to build a minimal image to have the OS totally in memory (/dev/ramX).
SLES15.2 for the ISO image.
SLES15.5 for the kiwi host.

Any direction would be appreciated.

Do not want to used a HDD
If filter device is omitted from <oemconfig> /dev/sda is used to install the ISO.

The messae from qemu-kvm:
Warning: Could not find by-id representation of ram0


Kiwi setup:
<type image="oem" filesystem="ext4" initrd_system="dracut" installiso="true" installboot="install" kernelcmdline="console=ttyS0, rd.live.ram=1,rd.kiwi.ramdisk ramdisk_size=4096000" bootpartition="false">

 <bootloader name="grub2" console="serial" timeout="1"/>
 <oemconfig>
   <oem-unattended>false</oem-unattended>
   <oem-skip-verify>true</oem-skip-verify>
   <oem-unattended-id>/dev/ram1</oem-unattended-id>
   <oem-device-filter>/dev/sd</oem-device-filter>
   <oem-swap>false</oem-swap>
   <oem-multipath-scan>false</oem-multipath-scan>
</oemconfig>

Kiwi host:
kiwi-systemdeps-bootloaders-9.23.12-1.1.x86_64
kiwi-tools-9.23.12-1.1.x86_64
python3-kiwi-9.23.12-1.1.x86_64
kiwi-systemdeps-core-9.23.12-1.1.x86_64

The problem:
         Starting dracut pre-mount hook...
[    4.570383] dracut-pre-mount[418]: Warning: Could not find by-id representation of ram0
[    4.571764] dracut-pre-mount[418]: Warning: Using original device /dev/ram0
[    4.590415] dracut-pre-mount[418]: Warning: Could not find by-id representation of ram1
...

Then it stops at asking:
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Select Installation Disk                                                x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x                           /dev/ram0   3.9G                            x x
x x                           /dev/ram1   3.9G                            x x

-> select /dev/rm0
-> then
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Destroying ALL data on /dev/ram0, continue ?                                 x
x                                                                              x
x                                                                              x
tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
x                         < Yes >             < No  >                          x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

The loops on this:
[    4.570383] dracut-pre-mount[418]: Warning: Could not find by-id representation of ram0
[    4.571764] dracut-pre-mount[418]: Warning: Using original device /dev/ram0
[    4.590415] dracut-pre-mount[418]: Warning: Could not find by-id representation of ram1

From here to maintenance mode:

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.


Press Enter for maintenance
(or press Control-D to continue):

vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
:/root# cd /dev
:/dev/disk/by-id# ls -l
total 0
lrwxrwxrwx 1 root root  9 Feb  9 11:48 ata-QEMU_DVD-ROM_QM00003 -> ../../sr0
lrwxrwxrwx 1 root root 10 Feb  9 11:49 dm-name-ram0p1 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Feb  9 11:49 dm-uuid-part1-devnode_1:0_Wh5pYvM -> ../../dm-0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In /run/initramfs/rdsosreport.txt:

[   64.634657] localhost systemd[1]: Started Dracut Run Interactive.
[   64.645004] localhost systemd-udevd[1822]: failed to execute '/usr/lib/udev/kpartx_id' 'kpartx_id 254 0 part1-devnode_1:0_Wh5pYvM': No such file or directory
[   64.653632] localhost systemd[1]: Started dracut pre-mount hook.

From Kiwi build:

[ INFO    ]: 12:39:40 | --> DEFAULT_APPEND:"console=ttyS0, rd.kiwi.ramdisk ramdisk_size=4096000 root=UUID=c0d0eeae-dd80-43b4-815d-52938ff6c044 rw "
[ INFO    ]: 12:39:40 | --> FAILSAFE_APPEND:"console=ttyS0, rd.kiwi.ramdisk ramdisk_size=4096000 root=UUID=c0d0eeae-dd80-43b4-815d-52938ff6c044 rw  ide=nodma apm=off noresume edd=off nomodeset 3 "
[ INFO    ]: 12:39:40 | --> LOADER_LOCATION:mbr
[ INFO    ]: 12:39:40 | --> LOADER_TYPE:grub2

In /run/initramfs/rdsosreport.txt: The same UUID

ID_PART_TABLE_UUID=edf34926
ID_PART_TABLE_TYPE=dos
+ ls -l /dev/disk/by-id /dev/disk/by-label /dev/disk/by-partuuid /dev/disk/by-path /dev/disk/by-uuid
/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root  9 Feb  9 11:48 ata-QEMU_DVD-ROM_QM00003 -> ../../sr0
lrwxrwxrwx 1 root root 10 Feb  9 11:49 dm-name-ram0p1 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Feb  9 11:49 dm-uuid-part1-devnode_1:0_Wh5pYvM -> ../../dm-0

/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root  9 Feb  9 11:48 INSTALL -> ../../sr0
lrwxrwxrwx 1 root root 10 Feb  9 11:49 ROOT -> ../../dm-0

/dev/disk/by-partuuid:
total 0
lrwxrwxrwx 1 root root 10 Feb  9 11:49 edf34926-01 -> ../../dm-0

/dev/disk/by-path:
total 0
lrwxrwxrwx 1 root root 9 Feb  9 11:48 pci-0000:00:01.1-ata-2 -> ../../sr0
lrwxrwxrwx 1 root root 9 Feb  9 11:48 pci-0000:00:01.1-ata-2.0 -> ../../sr0

/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root  9 Feb  9 11:48 2021-02-09-11-41-10-00 -> ../../sr0
lrwxrwxrwx 1 root root 10 Feb  9 11:49 c0d0eeae-dd80-43b4-815d-52938ff6c044 -> ../../dm-0
+ for _i in /etc/conf.d/*.conf


Thanks so much,
Jan 

Jan Robinson

unread,
Feb 9, 2021, 8:10:47 AM2/9/21
to kiwi
Correction: Type declaration was:
<type image="oem" filesystem="ext4" installiso="true" initrd_system="dracut" installboot="install" kernelcmdline="console=ttyS0, rd.kiwi.ramdisk ramdisk_size=4096000">

Marcus Schäfer

unread,
Feb 9, 2021, 11:29:45 AM2/9/21
to kiwi-...@googlegroups.com
Hi,

> Warning: Could not find by-id representation of ram0

I can reproduce this. The hook script /lib/dracut/hooks/mount/30-kiwi-mount-ramdisk.sh which exists and is expected to be called by dracut was not
called.

We are on it

Regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE Software Solutions Germany GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
HRB: 21284 (AG Nürnberg) Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
http://www.suse.de
-------------------------------------------------------
signature.asc

Marcus Schäfer

unread,
Feb 9, 2021, 12:04:38 PM2/9/21
to kiwi-...@googlegroups.com
Hi,

> > Warning: Could not find by-id representation of ram0
>
> I can reproduce this. The hook script /lib/dracut/hooks/mount/30-kiwi-mount-ramdisk.sh which exists and is expected to be called by dracut was not
> called.

There is a patch on review:

https://github.com/OSInside/kiwi/pull/1714
signature.asc

Marcus Schäfer

unread,
Feb 9, 2021, 12:56:20 PM2/9/21
to kiwi-...@googlegroups.com
Hi,

> There is a patch on review:
>
> https://github.com/OSInside/kiwi/pull/1714

actually

https://github.com/OSInside/kiwi/pull/1715

sorry
signature.asc

Jan Robinson

unread,
Feb 10, 2021, 12:38:19 AM2/10/21
to kiwi
Hello Marcus

> There is a patch on review:

https://github.com/OSInside/kiwi/pull/1715

Much appreciated, I'll test it.

Thanks so much 

Marcus Schäfer

unread,
Feb 10, 2021, 6:16:29 AM2/10/21
to kiwi-...@googlegroups.com
Hi,

> > There is a patch on review:
> [1]https://github.com/OSInside/kiwi/pull/1715
>
> Much appreciated, I'll test it.

The fix got approved, we have done some tests and they worked for us.
Expect this to be available in 9.23.14 and the respective kiwi dracut
modules.

I plan for a release by the end of the week.

Thanks for reporting this one. We also created an integration test
for the ramdisk feature now here:

https://build.opensuse.org/package/show/Virtualization:Appliances:Images:Testing_x86:suse/test-image-disk-ramdisk

since this one was a regression we should do better testing in
this regard
signature.asc

Jan Robinson

unread,
Feb 11, 2021, 3:37:12 AM2/11/21
to kiwi
Thank you so much for the work done and the new update coming.
From here I suppose:

Marcus Schäfer

unread,
Feb 11, 2021, 8:52:11 AM2/11/21
to kiwi-...@googlegroups.com
Hi,

> Thank you so much for the work done and the new update coming.
>
> From here I suppose:
>
> https://download.opensuse.org/repositories/Virtualization:/Appliances:/
> Builder/SLE_15_SP2/x86_64/

Yes you can expect it there. We have a candidate in Staging just in
case you want to test before we release:

https://download.opensuse.org/repositories/Virtualization:/Appliances:/Staging/SLE_15/x86_64/

no warranties, for stuff in Staging :)
signature.asc

Jan Robinson

unread,
Feb 11, 2021, 10:02:01 AM2/11/21
to kiwi
Hi Marcus

I will pursue that tomorrow morning first thing.

Thanks so much.

Jan Robinson

unread,
Feb 12, 2021, 2:42:49 AM2/12/21
to kiwi
Hello Marcus

9.23.14-2 has done it for us. 

Thank you so much for the prompt support.

Much appreciated.
Jan

Marcus Schäfer

unread,
Feb 12, 2021, 9:23:28 AM2/12/21
to kiwi-...@googlegroups.com
Hi Jan,

> 9.23.14-2 has done it for us.
> Thank you so much for the prompt support.

Happy to hear that :)

Release is now also done and will appear soon in Virt:App:Builder

Have a great weekend
signature.asc
Reply all
Reply to author
Forward
0 new messages