From 1c44ea001e33e28cbcdc64ec705aa2d83a93ced0 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 26 Oct 2024 12:54:15 +0200 Subject: [PATCH] livecd: remove old dir --- platforms/livecd/old/initramfs-include.sh | 76 ----------------------- 1 file changed, 76 deletions(-) delete mode 100644 platforms/livecd/old/initramfs-include.sh diff --git a/platforms/livecd/old/initramfs-include.sh b/platforms/livecd/old/initramfs-include.sh deleted file mode 100644 index 2454c28..0000000 --- a/platforms/livecd/old/initramfs-include.sh +++ /dev/null @@ -1,76 +0,0 @@ -FOUND_ROOTFS= -#RAMSIZE=256144 -o "size=${RAMSIZE}k" - -msg ":: Creating new root ramdisk (dinamic size=${RAMSIZE}k) on /dev/shm..." -mkdir /newroot -/bin/mount -t tmpfs /dev/shm /newroot - -mkdir /newroot/cdrom /newroot/squashfs - -# -# findcdrom(): looks for cdrom devices and mounts them to detect compressed fs -# -findcdrom(){ - msg ":: Looking for cdrom device(s)" - - # try removable devices only - for i in /sys/block/*/removable; do - removable=`cat $i` - if [ "$removable" = "1" ]; then - dev=${i%/removable} - dev=/dev/${dev#/sys/block/} - if mount -r -t iso9660 $dev /newroot/cdrom >/dev/null 2>&1; then - if test -r /newroot/cdrom/rootfs.compressed; then - msg ":: Compressed root filesystem found on $dev..." - FOUND_ROOTFS="$dev" - return 0 - fi - umount /newroot/cdrom - fi - fi - done - return 1 -} - -#/sbin/splash_util -c repaint ${splash_add} -t default --mesg="Looking for cdrom device" --progress="4444" - -while true; do - findcdrom - if [ "$FOUND_ROOTFS" ]; then -# /sbin/splash_util -c repaint ${splash_add} -t default --mesg="Mounting compressed filesystem" --progress="5555" - msg ":: Mounting compressed filesystem" - /bin/losetup /dev/loop0 /newroot/cdrom/rootfs.compressed - mount -r -t squashfs /dev/loop0 /newroot/squashfs - - msg ":: Creating directories and symlinks on ramdisk..." - - mkdir -p \ - /newroot/tmp /newroot/proc /newroot/sys \ - /newroot/initrd /newroot/mnt /newroot/media \ - /newroot/oldroot - - ln -s squashfs/bin /newroot/bin - ln -s squashfs/boot /newroot/boot - ln -s squashfs/lib /newroot/lib - ln -s squashfs/opt /newroot/opt - ln -s squashfs/sbin /newroot/sbin - ln -s squashfs/srv /newroot/srv - ln -s squashfs/usr /newroot/usr - - chroot /newroot /bin/cp -a \ - /squashfs/dev /squashfs/home /squashfs/var \ - /squashfs/etc /squashfs/root / - - # Create empty utmp and wtmp - :> /newroot/var/run/utmp - :> /newroot/var/run/wtmp - - [ "${init}" ] || init=/sbin/init - msg ":: Running init, runlevel:${runlevel}" - exec run-init /newroot ${init} ${runlevel} - exit 0 - else - msg ":: Could not find compressed root filesystem. image; opening a command prompt." - /bin/sh.shared - fi -done