boot RSPRO from usb

Monthadar Al Jaberi monthadar at gmail.com
Fri Dec 9 18:10:37 UTC 2011


On Fri, Dec 9, 2011 at 4:59 PM, Maciej Milewski <milu at dat.pl> wrote:
> Dnia piątek, 9 grudnia 2011 16:00:59 Monthadar Al Jaberi pisze:
>>
>> ofcourse:
>> makefs -t ffs -B big -s 20m ../target_image/rootfs.img rspro/root/
> Doesn't sound wrong but don't have my script to compare now.
>>
>> I dont know if I need to run fsck, I am using same image embedded in kernel:
>> ROOTDEVNAME=\"ufs:/dev/md0.uzip\"
>>
>> and it works, and also as I noted above I have an old kernel that
>> loads fine from same usb....
> I must have overlooked that.
>
>>
>> > Alternative way maybe would work. Have you tried to run system from nfs
>> > and create fs by newfs + (cp || untar || rsync || install) needed
>> > system files?
>> sorry, but I dont understand, can you explain a bit more?
> 1. boot some working environment with tools like gpart, newfs, mount
> 2. gpart your usb drive (or not if you want to use full drive)
> 3. newfs that
> 4. transfer tar.gz of rspro/root contents and utar it into new drive
> 5. reboot with correct rootdevname
>
> Does that sound better? :)

indeed =)

ok I did this:

cd rspro/root
tar -cvf ../root.img.gz *
newfs -O1 /dev/da0
mount /dev/da0 /root/usb
cd /root/usb
tar -xvf /root/src/terranet/target_root/rspro/root.img.gz
umount /root/usb/
reboot

same result:
Trying to mount root from ufs:/dev/da0 []...
warning: no time-of-day clock registered, system time will not be set accurately
g_vfs_done():da0[READ(offset=1060798464, length=32768)]error = 5
exec /sbin/init: error 5
g_vfs_done():da0[READ(offset=1060798464, length=32768)]error = 5
exec /sbin/oinit: error 5
g_vfs_done():da0[READ(offset=1060798464, length=32768)]error = 5
exec /sbin/init.bak: error 5
g_vfs_done():da0[READ(offset=530448384, length=32768)]error = 5
exec /rescue/init: error 5
init: not found in path
/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall
panic: no init
KDB: enter: panic
[ thread pid 1 tid 100001 ]
Stopped at      kdb_enter+0x4c: lui     at,0x804e
db>


if I have empty filesystem, (or I did mistake in begining and copied
folder root, so everything was in /root/*)
I get this error instead:
Trying to mount root from ufs:/dev/da0 []...
warning: no time-of-day clock registered, system time will not be set accurately
init: not found in path
/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall
panic: no init
KDB: enter: panic
[ thread pid 1 tid 100001 ]
Stopped at      kdb_enter+0x4c: lui     at,0x804e
db>



>>
>> > --
>> > Maciej
> --
> Maciej



-- 
Monthadar Al Jaberi


More information about the freebsd-mips mailing list