Log in

Bekijk de volledige versie : kfurge on usb?



Okoun
29-07-2008, 10:57
Hello, is there a way to put kfurge firmware on a usb flash drive and boot from it?
I think this could solve all hdd spinup issues very easily...

The problem is that I saw in the logs is that usb modules are loaded after the HDD is already booted. Any ideas how to deal with it?

And for the record I am quite experienced with Linux. However I haven't tried to crosscompile anything yet. I hope this won't be needed :-)

kfurge
06-08-2008, 02:27
It's possible, but I suspect it would require substantial hacking to the Asus distribution. More time than I'm willing to invest.

- K.C.

Okoun
17-05-2009, 14:59
I'm back :-)
I've been using asterisk in my asus for sime time and I really want to do something about the disk spinning up, because it is affecting asterisk performance. Sometimes it is really a problem when there is an incoming call and asterisk needs to get some data from the suspended HDD...

So I came up with this solution

I have a USB flash drive, the first partition is just a copy of part1/2 on the HDD, the second partition is my /opt directory from KFurge firmware.

I run the following script at the bottom of /shares/MYSHARE1/opt/etc/rc.local script in case /dev/scsi/*/part2 is present at boot time

So far it seems to work well, at least events from asterisk don't seem to spin up the HDD, so there are no delays.

I have a problem with vsftpd however, I can't list the contents of the "shares" directory, but I can reach shares/MYSHARE1/ without problems. I don't know where the problem might be, as I don't understand where all the permissions for vsftpd are saved. Any suggestions?
Killing and re-running vsftpd won't help.

One last thing - I have to put the USB stick in the front port, because in the rear it gave me a bunch of I/O errors etc. I don't get it why, perhaps this is caused by a printer which is in the rear too. I suspect that the rear ports are either connected by a hub, or they are slower. Or could the rear port be damaged?


#!/bin/sh

PATH=/opt/bin:/opt/sbin:${PATH}
LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}

/opt/bin/umount -l /mnt/

mount -o ro /dev/scsi/host1/bus0/target0/lun0/part1 /mnt

mount -o move /proc /mnt/proc
pivot_root /mnt /mnt/mnt
mount -o move /mnt/dev /dev


mount -o move /mnt/tmp /tmp
mount -o move /mnt/shares /shares
mount -o move /mnt/foreign_shares /foreign_shares


mkdir /foreign_shares/opt-usb
mount -t reiserfs /dev/scsi/host1/bus0/target0/lun0/part2 /foreign_shares/opt-usb/
mount -o bind /foreign_shares/opt-usb/ /opt/

umount -l /mnt/opt
umount -l /mnt/opt
umount -l /mnt

cp /shares/MYVOLUME1/opt/var/run/sshd.pid /opt/var/run/sshd.pid
/opt/etc/init.d/S40sshd

killall asterisk && asterisk
killall smbd nmbd
/usr/local/samba/sbin/smbd
/usr/local/samba/sbin/nmbd

swapoff /dev/md/0

# just for my convenience - after I reboot I usually want to tweak some stuff, so I want to have the USB flash in rw mode for a while
sh -c "sleep 300s; mount -o remount,ro /dev/scsi/host1/bus0/target0/lun0/part2"&

cstring
09-05-2010, 20:39
Can anyone make a tutorial on this? this seems like something that would really save power and lower the risk of hard-drive failure.