Creating & deploying live OS
-
Hello, i want to deploy live image via fog and ipxe, so i have created a clone from working OS with “Linux-live” and now i have iso with such structure
ls -l
total 1878760
-rw-r–r–. 1 root root 1923846144 Aug 12 22:45 01-core.sb
drwxr-xr-x. 3 root root 4096 Aug 12 22:08 boot
drwxr-xr-x. 2 root root 6 Aug 12 22:08 changes
drwxr-xr-x. 2 root root 6 Aug 12 22:08 modulesls -l boot
total 24240
-rwxr-xr-x. 1 root root 1292 Aug 12 22:08 bootinst.bat
-rwxr-xr-x. 1 root root 1236 Aug 12 22:08 bootinst.sh
-rw-r–r–. 1 root root 7336 Aug 12 22:08 bootlogo.png
drwxr-xr-x. 3 root root 18 Aug 12 22:08 EFI
-rwxr-xr-x. 1 root root 208480 Aug 12 22:08 extlinux.x32
-rwxr-xr-x. 1 root root 209424 Aug 12 22:08 extlinux.x64
-rw-r–r–. 1 root root 12202288 Aug 12 22:08 initrfs.img
-rw-r–r–. 1 root root 40960 Aug 12 22:08 isolinux.bin
-r–r–r–. 1 root root 2048 Aug 12 22:59 isolinux.boot
-rw-r–r–. 1 root root 116552 Aug 12 22:08 ldlinux.c32
-rw-r–r–. 1 root root 181944 Aug 12 22:08 libcom32.c32
-rw-r–r–. 1 root root 23628 Aug 12 22:08 libutil.c32
-rw-r–r–. 1 root root 440 Aug 12 22:08 mbr.bin
-rw-r–r–. 1 root root 46909 Aug 12 22:08 pxelinux.0
-rw-r–r–. 1 root root 457 Aug 12 22:08 syslinux.cfg
-rw-r–r–. 1 root root 126511 Aug 12 22:08 syslinux.com
-rw-r–r–. 1 root root 243712 Aug 12 22:08 syslinux.exe
-rw-r–r–. 1 root root 26684 Aug 12 22:08 vesamenu.c32
-rw-------. 1 root root 11342464 Aug 12 22:08 vmlinuzAnyone have an idea or experience with such thing?
Even dont know from what to start to try and what to add to ipxe menu.I have an update:
1.
Simple string =>
sanboot http://${fog-ip}/img/PopOS/popos_live.iso
shows me an error:
looking for linux data in /linux…
Fatal error occurred Couldnt locate linux datakernel http://${fog-ip}/img/PopOS/linux/boot/vmlinuz
initrd http://${fog-ip}/img/PopOS/linux/boot/initrfs.img root=http://${fog-ip}/img/PopOS/linux/ load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 debug
boot || goto MENUKernel Panic -not syncing : VFS unable to mount rootfs on unknown-block{0,0}
Looks like something wring with rootfs. Anyway it should loads properly with Menu 1 =(
will try later , any advices? -
@kermion said in Creating & deploying live OS:
kernel http://${fog-ip}/img/PopOS/linux/boot/vmlinuz
initrd http://${fog-ip}/img/PopOS/linux/boot/initrfs.img root=http://${fog-ip}/img/PopOS/linux/ load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 debug
boot || goto MENU
Kernel Panic -not syncing : VFS unable to mount rootfs on unknown-block{0,0}The kernel panic is that the kernel can’t mount the initrd file. While I haven’t messed with popos I can only guess at this one.
Lets try to change up the fog ipxe menu to something like this
kernel http://${fog-ip}/img/PopOS/linux/boot/vmlinuz initrd http://${fog-ip}/img/PopOS/linux/boot/initrfs.img imgargs vmlinuz initrd=initrfs.img root=http://${fog-ip}/img/PopOS/linux/ load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 debug boot || goto MENU
Now your popos files for this
http://${fog-ip}/img/PopOS/linux/
need to exist under the apache document root./var/www/html/img/PopOS/linux/
In this directory is where you need to place the content of the iso image. -
This post is deleted! -
@kermion OK great, you cleared the first two hurdles.
We can see it switch from the kernel boot to the OS on the initrd disk. Now it looks like its having a problem access the rest of the linux OS on
root=http://${fog-ip}/img/PopOS/linux/
That is just a guess but that is kind of where it points.On the FOG server what is the results of this command
ls -la /var/www/html/img/PopOS/linux/
That should be the base directory for the contents of the iso… I think -
@george1421
HI,Thank you for help.
Just tried to boot with your menu:
Files is already on place:
File 01-core.sb 01-core.sb: Squashfs filesystem, little endian, version 4.0, xz compressed, 1923844258 bytes, 199253 inodes, blocksize: 1048576 bytes, created: Fri Aug 12 19:45:03 2022
Also i re-read your message and extracted files from 01-core.sb in linux folder:
[root@fog linux]# ls -al total 1878772 drwxr-xr-x. 12 root root 192 Aug 15 21:14 . drwxr-xr-x. 4 root root 67 Aug 15 21:09 .. -rw-r--r--. 1 root root 1923846144 Aug 12 22:45 01-core.sb lrwxrwxrwx. 1 root root 7 Feb 19 09:27 bin -> usr/bin drwxr-xr-x. 3 root root 4096 Aug 13 01:41 boot drwxr-xr-x. 2 root root 6 Aug 12 22:08 changes drwxr-xr-x. 137 root root 8192 Aug 12 22:05 etc drwxr-xr-x. 3 root root 21 Aug 12 21:17 home lrwxrwxrwx. 1 root root 7 Feb 19 09:27 lib -> usr/lib lrwxrwxrwx. 1 root root 9 Feb 19 09:27 lib64 -> usr/lib64 drwxr-xr-x. 2 root root 6 Aug 12 22:08 modules drwxr-xr-x. 2 root root 6 Aug 12 21:17 opt drwx------. 7 root root 176 Aug 12 22:02 root lrwxrwxrwx. 1 root root 8 Feb 19 09:27 sbin -> usr/sbin drwxr-xr-x. 2 root root 6 Feb 19 09:27 srv drwxr-xr-x. 14 root root 160 Feb 19 09:27 usr drwxr-xr-x. 14 root root 167 Aug 12 21:17 var [root@fog linux]# pwd /var/www/html/img/PopOS/linux
Doesnt work- the same error - Couldnt locate linux data. Im thinking is why there is a /linux - like it searching in linux folder in root.Also i cannot change this dir with
“root=http://${fog-ip}/img/PopOS/linux/” even if im putting “root=http://${fog-ip}/img/PopOS/linux/BLABLA” it searching in /linux anyway. -
@george1421 said in Creating & deploying live OS:
ls -la /var/www/html/img/PopOS/linux/
Arrgh, missed with replyed message.
Here is a text version:ls -la /var/www/html/img/PopOS/linux/ total 1878772 drwxr-xr-x. 12 root root 192 Aug 15 21:14 . drwxr-xr-x. 4 root root 67 Aug 15 21:09 .. -rw-r--r--. 1 root root 1923846144 Aug 12 22:45 01-core.sb lrwxrwxrwx. 1 root root 7 Feb 19 09:27 bin -> usr/bin drwxr-xr-x. 3 root root 4096 Aug 13 01:41 boot drwxr-xr-x. 2 root root 6 Aug 12 22:08 changes drwxr-xr-x. 137 root root 8192 Aug 12 22:05 etc drwxr-xr-x. 3 root root 21 Aug 12 21:17 home lrwxrwxrwx. 1 root root 7 Feb 19 09:27 lib -> usr/lib lrwxrwxrwx. 1 root root 9 Feb 19 09:27 lib64 -> usr/lib64 drwxr-xr-x. 2 root root 6 Aug 12 22:08 modules drwxr-xr-x. 2 root root 6 Aug 12 21:17 opt drwx------. 7 root root 176 Aug 12 22:02 root lrwxrwxrwx. 1 root root 8 Feb 19 09:27 sbin -> usr/sbin drwxr-xr-x. 2 root root 6 Feb 19 09:27 srv drwxr-xr-x. 14 root root 160 Feb 19 09:27 usr drwxr-xr-x. 14 root root 167 Aug 12 21:17 var
Looks like /linux path hardcoded during cloning PopOS with a linux-live.
-
@kermion So does that directory look like the root of the ISO?
-
@george1421
Now it looks like OS structure from / ,except few directories and file named 01-core.sb(its a squashfs file with all of files in that dir)
I dont know what i need to put in linux folder. Searching in linux-live sources for 'Looking for linux data" i found a filehttps://github.com/Tomas-M/linux-live/blob/master/livekitlib
Looks like one of initial loaded files searching for /linux on mounted devices. This folder can be changed before creating clone of OS.
-
FYI , Both files uploaded succesfully.
Trying to boot with
kernel http://${fog-ip}/img/PopOS/linux/boot/vmlinuz initrd http://${fog-ip}/img/PopOS/linux/boot/initrfs.img imgargs vmlinuz initrd=initrfs.img root=http://${fog-ip}/img/PopOS/ load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 boot || goto MENU
thought if it search in /linux, maybe http://${fog-ip}/img/PopOS/ will work. But no luck =(
UPD: looking in /var/log/livedbg and found this errors
Maybe i need to somehow load aufs-dkms ,but i cannot find it for PopOS.
Going to linux-live github to get some answers. -
@kermion
Now i get a help from LTSP , but still stuck with this:and here is a video of boot process:
[https://temp.sh/WAZio/Screen Recording 2022-08-16 at 22.08.18.mov](link url) -
@kermion So lets backup a bit.
Where did you get the parameters block?
kernel http://${fog-ip}/img/PopOS/linux/boot/vmlinuz initrd http://${fog-ip}/img/PopOS/linux/boot/initrfs.img root=http://${fog-ip}/img/PopOS/linux/ load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 debug boot || goto MENU
Doing some research it appears that pop_os is similar to ubuntu. I don’t know that as a fact but i’m seeing similar references. Final post here: https://github.com/ipxe/ipxe/discussions/533
Now I do have a post on netbooting ubuntu 19.04 here: https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-images/5?_=1660690322320
And in that case the parameter block would look like this:
kernel tftp://${fog-ip}/os/ubuntu/Server19.10/linux initrd tftp://${fog-ip}/os/ubuntu/Server19.10/initrd.gz imgargs linux root=/dev/nfs boot=casper netboot=nfs nfsroot=${fog-ip}:/images/os/ubuntu/Server19.10/ locale=en_US.UTF-8 keyboard-configuration/layoutcode=us quiet splash ip=dhcp rw boot || goto MENU
What is also interesting is the imgargs line
imgargs linux root=/dev/nfs boot=casper netboot=nfs nfsroot=${fog-ip}:/images/os/ubuntu/Server19.10/ locale=en_US.UTF-8 keyboard-configuration/layoutcode=us quiet splash ip=dhcp rw
See how this one references NFS that kind of ties into the latest error message about not being able to mount the nfs share (because the parameters are missing in your imgargs line).
-
@george1421 Hi, I`m sorry , i have attached wrong info and screenshot with video. It was a result of my attempts to boot from .tgz ubuntu which i found in an old sysadmin files, which very like a foreman tools.