vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a 250MB install of slackware 9 working off a hard disk. I'm attempting to transplant it to a CD. Using isolinux, I am able to boot the default kernel and load the initial ramdisk. It then successfully starts init. Init calls a script which starts off by mounting the cdrom. It then makes links in the ram resident root fs for bin, sbin, usr and so on, pointing to the same directories on the CDROM. here's the script that does all this. PATH=/sbin:/bin echo "mounting the cd from hdc" /bin/mount -t iso9660 -o ro,suid,dev,exec,noauto,nouser,sync /dev/hdc /mnt/cdrom && echo "mounted" # And we start with the files. # Link in the dirs on the cdrom FILES="bin boot dev lib root sbin usr" for AFILE in $FILES ; do echo "/$AFILE -> /mnt/cdrom/$AFILE" /bin/ln -sf /mnt/cdrom/$AFILE /$AFILE && echo "done" done echo "Directories linked" export PATH=/sbin:/bin echo "CDROM ROOT is:" /bin/ls -l /mnt/cdrom/ echo "" echo "press ENTER to continue" read Answer echo "linking in files in /etc" rm -f /etc mkdir /etc ln -s /mnt/cdrom/etc/* /etc echo "make init read new inittab file" /bin/kill -HUP 1 && echo "done" exec /etc/rc.d/rc.S || echo "PROBLEMS!!!" The problem is, after the links are made, "/bin/ls" fails because it can't find librt.so.6 I thought this was because of symlinks throwing off the dynamic linker, but then, I had /lib ( on the initrd.img) linked to /preinit/lib, where I had the necessary libraries for mount and ln. Also, /bin was symlinked to /preinit/bin on the initrd.img, where I had the symlinks from sh to bash. I wonder what I am missing... |
| ||||
| On Thu, 18 Dec 2003 21:16:40 -0500, joseph philip wrote: > I have a 250MB install of slackware 9 working off a hard disk. I'm > attempting to transplant it to a CD. > > Using isolinux, I am able to boot the default kernel and load the initial > ramdisk. It then successfully starts init. > > Init calls a script which starts off by mounting the cdrom. It then makes > links in the ram resident root fs for bin, sbin, usr and so on, pointing > to the same directories on the CDROM. > > here's the script that does all this. > > PATH=/sbin:/bin > > echo "mounting the cd from hdc" > /bin/mount -t iso9660 -o ro,suid,dev,exec,noauto,nouser,sync /dev/hdc > /mnt/cdrom && echo "mounted" > > # And we start with the files. > > > # Link in the dirs on the cdrom > FILES="bin boot dev lib root sbin usr" for AFILE in $FILES ; do > echo "/$AFILE -> /mnt/cdrom/$AFILE" > /bin/ln -sf /mnt/cdrom/$AFILE /$AFILE && echo "done" done > > echo "Directories linked" > export PATH=/sbin:/bin > > echo "CDROM ROOT is:" > > /bin/ls -l /mnt/cdrom/ > echo "" > echo "press ENTER to continue" > read Answer > > > echo "linking in files in /etc" > > rm -f /etc > mkdir /etc > ln -s /mnt/cdrom/etc/* /etc > > > > echo "make init read new inittab file" > > /bin/kill -HUP 1 && echo "done" > > exec /etc/rc.d/rc.S || echo "PROBLEMS!!!" > > > > > The problem is, after the links are made, "/bin/ls" fails because it can't > find librt.so.6 > > I thought this was because of symlinks throwing off the dynamic linker, > but then, I had /lib ( on the initrd.img) linked to /preinit/lib, where I > had the necessary libraries for mount and ln. > > Also, /bin was symlinked to /preinit/bin on the initrd.img, where I had the > symlinks from sh to bash. > > I wonder what I am missing... Found it. in the rc.s file, I should be doing ln -nfs /mnt/cdrom/$F /$F This successfully breaks the existing link and replaces it with a new one point to the cdrom's directories. It's working |