Question on conversion from initrd to initramfs (1/2027 initrd support drop from kernel)

"Michael D. Setzer II via busybox" <[email protected]>
Newsgroups gmane.linux.busybox
Message-ID <[email protected]>
In doing a test with kernel 7.0.rc1 and later 7.0.rc2 noticed dmesg 
lines about initrd support being removed by 1/2027. So looked into 
doing the conversion.

Tried about 20 things I found online, but many resulted in kernel 
panics. But final working solution resulted in minor changes.

Original method would create ramdisk.lzma from a directory 
structor and the new method creates initramfs.lzma. 

Then changes included creating an init file that is a link to the 
origina etc/init.d/rcS2 which has one line added to end the earlier 
rcS init file. (Old setup goes back to 2004, when I took over 
project).

The added line is.
exec /sbin/init

Seems that is to keep PID 1 running? 

Other change was to comment  first line of 
cat etc/inittab

#::sysinit:/etc/init.d/rcS
::ctrlaltdel:/sbin/reboot
tty1::respawn:/bin/login g4l
tty2::askfirst:/bin/login
tty3::askfirst:/bin/login
tty4::askfirst:/bin/login
tty5::askfirst:/bin/login

Then only change I've noted is that under old initrd boot the df 
command would show this
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root.old           127507     75746     51761  59% /
with initramfs get this.
Filesystem           1K-blocks      Used Available Use% Mounted on

The initramfs starts by this
echo "Packing rootfs into cpio archive"
(
    cd bootcd/rootfs
    # Include hidden files (.bash_profile etc.) via find so nothing is 
missed.
    find . | cpio --quiet -o -H newc
) > bootcd/isolinux/ramdisk.cpio

later the is compressed
lzma -v bootcd/isolinux/ramdisk.cpio
mv bootcd/isolinux/ramdisk.cpio.lzma /boot/initramfs.lzma
(will clean files names soon).

So loading kernel and initramfs.lzma works from
syslinux booting with hybrid image via cd or usb
grub4dos bios and uefi usbs
grub directly.

	linux /bz6x19.5 
	initrd /initramfs.lzma

Don't know if I missed anything? Or did something not necessary.
Thanks. 


+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)     
 mailto:[email protected]                            
 mailto:[email protected]
 mailto:[email protected]
 Guam - Where America's Day Begins                        
 G4L Disk Imaging Project maintainer 
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.