View previous topic :: View next topic |
Author |
Message |
solamour l33t
Joined: 21 Dec 2004 Posts: 726 Location: San Diego, CA
|
|
Back to top |
|
|
Raffi l33t
Joined: 17 Mar 2003 Posts: 731 Location: Moscow, Id.
|
Posted: Wed Jun 10, 2020 6:39 pm Post subject: |
|
|
Last time I did this (a couple of weeks ago), I just made the changes by hand, but here's a patch from that changes
Code: |
--- init.old 2020-06-10 11:37:47.050888808 -0700
+++ init 2020-06-10 11:38:43.594721612 -0700
@@ -664,6 +664,10 @@
if [ "${got_good_root}" != '1' ] && [ /dev/nfs != "${REAL_ROOT}" ] && [ sgimips != "${LOOPTYPE}" ] && [ 1 != "${aufs}" ] && [ 1 != "${overlayfs}" ]
then
bootstrapCD
+ elif [ "${REAL_ROOT}" = '/' ]
+ then
+ got_good_root=1
+ cp /image.squashfs ${CDROOT_PATH}
fi
if [ "${REAL_ROOT}" = '' ] && [ "${got_good_root}" != '1' ]
|
|
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 726 Location: San Diego, CA
|
Posted: Wed Jun 10, 2020 8:39 pm Post subject: |
|
|
Raffi wrote: | Last time I did this (a couple of weeks ago), I just made the changes by hand, but here's a patch from that changes
Code: |
--- init.old 2020-06-10 11:37:47.050888808 -0700
+++ init 2020-06-10 11:38:43.594721612 -0700
@@ -664,6 +664,10 @@
if [ "${got_good_root}" != '1' ] && [ /dev/nfs != "${REAL_ROOT}" ] && [ sgimips != "${LOOPTYPE}" ] && [ 1 != "${aufs}" ] && [ 1 != "${overlayfs}" ]
then
bootstrapCD
+ elif [ "${REAL_ROOT}" = '/' ]
+ then
+ got_good_root=1
+ cp /image.squashfs ${CDROOT_PATH}
fi
if [ "${REAL_ROOT}" = '' ] && [ "${got_good_root}" != '1' ]
|
|
That did the trick. Thank you.
One thing I noticed is that as long as I have "loop=/image.squashfs" (i.e. use absolute path), I don't need to copy "image.squashfs". In other words,
Code: | [pxelinux.cfg/default]
label gentoo
kernel gentoo/gentoo
append initrd=gentoo/gentoo.igz root=/dev/ram0 init=/linuxrc loop=/image.squashfs looptype=squashfs cdroot=1 real_root=/
|
Code: | [init]
if [ "${got_good_root}" != '1' ] && [ /dev/nfs != "${REAL_ROOT}" ] && [ sgimips != "${LOOPTYPE}" ] && [ 1 != "${aufs}" ] && [ 1 != "${overlayfs}" ]
then
bootstrapCD
elif [ "${REAL_ROOT}" = '/' ]
then
got_good_root=1
fi
|
__
sol
Last edited by solamour on Wed Jun 10, 2020 8:49 pm; edited 1 time in total |
|
Back to top |
|
|
Raffi l33t
Joined: 17 Mar 2003 Posts: 731 Location: Moscow, Id.
|
Posted: Wed Jun 10, 2020 8:44 pm Post subject: |
|
|
Since my iso is not what I put on my tftp site and is not available anywhere else, there would be no image.squashfs if I didn't copy it into the ramdisk.
One of these days I need to revisit this and see if there is a better way, but for now, every year or so, I update my network book and as long as I works, I've not really spent much time with it. |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 726 Location: San Diego, CA
|
Posted: Wed Jun 10, 2020 11:05 pm Post subject: |
|
|
As for me, the following step in the setup process must be the reason I could skip copying "image.squashfs" in init file.
Code: | # Copy in squashfs image
cp /mnt/loop/image.squashfs . |
Anyhow, I wish there were a simpler way than manually updating it every so often, especially when the official documentation can get easily outdated.
__
sol |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|