I'm using netboot/pxeboot with grub.
menuentry "Install Ubuntu 20.04" {
set gfxpayload=keep
echo 'Loading vmlinuz ...'
linux /tftp/vmlinuz ip=dhcp netboot=nfs nfsroot=10.0.0.20:/data/netboot/nfs/ubuntu2004/ boot=casper toram noquiet splash=off console=tty0 console=ttyS1,57600n8 ---
echo 'Loading initrd, this takes a long time ...'
initrd /tftp/initrd
}
It works fine, however, the loading of initrd over tftp is taking a long time (30+ minutes). I would like to compress (gz/bz2) this file to save on some file transfer time.
I had seen some examples out there referring to a initrd.gz
(One example: https://unix.stackexchange.com/questions/217002/which-iso-file-vmlinuz-and-initrd-gz-to-use-for-installing-centos-from-multiboo) but when I tried to just compress the file with gzip and use it, I get an error such as:
[ 12.543547] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 12.558487] Please append a correct "root=" boot option; here are the available partitions:
[ 12.575161] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Is there a way to compress this file so it can transfer a smaller file size, and have it uncompress before it tries to mount the root fs?
Alternatively, is there a way to transfer it over a different protocol (HTTP/FTP/SFTP/SCP/etc) ?