NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cannot find /sbin/init on one-file-NetBSD



Thanks Stephen & Quentin !

I executed this script, and finally succeeded to enter in single user mode.

#!/bin/sh
WORK=/tmp/work
mkdir $WORK $WORK/files $WORK/files/sbin $WORK/files/bin
$WORK/files/dev $WORK/files/lib $WORK/files/libexec
cp /sbin/init $WORK/files/sbin
cp /bin/sh $WORK/files/bin
cp /dev/MAKEDEV $WORK/files/dev

# /sbin/init shared libs
cp /lib/libutil.so.7 $WORK/files/lib
cp /lib/libcrypt.so.0 $WORK/files/lib
cp /lib/libc.so.12 $WORK/files/lib

# /bin/sh shared libs
cp /lib/libtermcap.so.0 $WORK/files/lib
cp /lib/libedit.so.2 $WORK/files/lib

cp /libexec/ld.elf_so $WORK/files/libexec
cd $WORK/files/dev
./MAKEDEV ramdisk
cd $WORK
/usr/sbin/makefs -s 4m -t ffs memdrive.img files
cp /usr/src/sys/arch/i386/compile/obj/MYKERNEL/netbsd .
/usr/sbin/mdsetimage netbsd memdrive.img
gzip < netbsd > mykernel.gz
cp mykernel.gz /

Thanks again.

---
hsmtkk%gmail.com@localhost


Home | Main Index | Thread Index | Old Index