Проект

Общее

Профиль

Действия

Pxe-livecd

Настройки загрузчика:

Файлы

tftp/gentoo
tftp/initramfs.igz
tftp/pxelinux.0

tftp/pxelinux.cfg/default

default gentoo

label gentoo
 kernel gentoo
 append initrd=initramfs.igz root=/dev/ram0 init=/linuxrc loop=/image.squashfs looptype=squashfs cdroot=1 real_root=/

Исправление для image.squashfs

На примере install-amd64-minimal-20120621.iso

diff -u init.orig init
--- init.orig    2012-08-01 12:37:57.000000000 +0600
+++ init    2012-08-01 12:39:08.000000000 +0600
@@ -372,10 +372,10 @@
         [ ! -e "${NEW_ROOT}/dev/tty1" ] && mknod "${NEW_ROOT}/dev/tty1" c 4 1
     fi

-    if [ "${REAL_ROOT}" != "/dev/nfs" ] && [ "${LOOPTYPE}" != "sgimips" ]
-    then
-        bootstrapCD
-    fi
+#    if [ "${REAL_ROOT}" != "/dev/nfs" ] && [ "${LOOPTYPE}" != "sgimips" ]
+#    then
+#        bootstrapCD
+#    fi

     if [ "${REAL_ROOT}" = '' ]
     then
@@ -460,7 +460,7 @@
         else
             bad_msg "Block device ${REAL_ROOT} is not a valid root device..." 
             REAL_ROOT="" 
-            got_good_root=0
+            got_good_root=1
         fi
     done

@@ -524,7 +524,7 @@
     [ -z "${LOOP}" ] && find_loop
     [ -z "${LOOPTYPE}" ] && find_looptype

-    cache_cd_contents
+    #cache_cd_contents

     # If encrypted, find key and mount, otherwise mount as usual
     if [ -n "${CRYPT_ROOT}" ]

Исходные файлы:

image.squashfs
isolinux/gentoo
isolinux/gentoo.igz
isolinux/isolinux.cfg

Приготовление

mkdir unpack
cd unpack
xzcat ../gentoo.igz | cpio -mdi
vi init
mkdir mnt/cdrom
mv -v ../image.squashfs mnt/cdrom/
find | cpio -o -H newc | xz -v --check=crc32 --x86 --lzma2 > ../initramfs.ixz

Обновлено Андрей Волков около 5 лет назад · 5 изменени(я, ий)