Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I noticed beattie's modification section in the initscripts-0.1/rc.sh file. Looks like it tries to execute the .DSM-G600-USB-KEY-init file if exists on a USB memory stick labelled DSMG600_KEY.
It would be nice if it looks for the existence of a directory to be used as the pivot_root. Something like:
mkdir /usbmnt && mount -L DSMG600_KEY /usbmnt
if [ -d /usbmnt/DSMG600_ROOT ]; then
cd /usbmnt/DSMG600_ROOT
/sbin/pivot_root . <oldroot>
...
fi
At this time, the initrd is already loaded into memory, we need to free it up using:
fd = open("/dev/ram0", O_RDWR);
ioctl(fd, BLKFLSZBUF);
close(fd);
--
Quang
Offline
qn1234 wrote:
I noticed beattie's modification section in the initscripts-0.1/rc.sh file. Looks like it tries to execute the .DSM-G600-USB-KEY-init file if exists on a USB memory stick labelled DSMG600_KEY.
It would be nice if it looks for the existence of a directory to be used as the pivot_root. Something like:
mkdir /usbmnt && mount -L DSMG600_KEY /usbmnt
if [ -d /usbmnt/DSMG600_ROOT ]; then
cd /usbmnt/DSMG600_ROOT
/sbin/pivot_root . <oldroot>
...
fi
Could you explain how this is an improvement?.
qn1234 wrote:
At this time, the initrd is already loaded into memory, we need to free it up using:
fd = open("/dev/ram0", O_RDWR);
ioctl(fd, BLKFLSZBUF);
close(fd);
--
Quang
I'll look into this.
Offline
beattie wrote:
Could you explain how this is an improvement?
This allows you to use your own ramdisk freeing up the original one.
--
Quang
Offline
qn1234 wrote:
beattie wrote:
Could you explain how this is an improvement?
This allows you to use your own ramdisk freeing up the original one.
--
Quang
I guess, unless there is a reason otherwise I'd suggest that you what you need to do in /mnt/pivot_root/.DSM-G600-USB-KEY-init, which is what I did. I don't want to place any restrictions on what can be done in that file. For Instance here is one version of .DSM-G600-USB-KEY-init. that I tested:
#! /bin/sh cd /mnt/pivot_root umount /sys/crfs losetup -d /dev/loop0 umount /proc pivot_root /mnt/pivot_root /mnt/pivot_root exec chroot / /bin/ash echo $0
Last edited by beattie (2007-01-28 09:10:43)
Offline
What you have right now would work just fine.
By the way, you probably fixed it - I noticed you have a command misspelled in the rc.sh file. It's supposed to be "unmount".
--
Quang
Offline
qn1234 wrote:
What you have right now would work just fine.
By the way, you probably fixed it - I noticed you have a command misspelled in the rc.sh file. It's supposed to be "unmount".
--
Quang
Are you saying I have a command named "unmount" in my script? or the command "umount" is misspelled?
There is no command "unmount", the correct command is "umount" this spelling goes back to early Unix versions.
Offline
Relax guys
There was "uount /sys/cfs" or something like that.
And about Dlink, they like to use "ehco" commands and empty if and do statements
Offline
sala wrote:
Relax guys
There was "uount /sys/cfs" or something like that.
And about Dlink, they like to use "ehco" commands and empty if and do statements
Yeah, I meant to say I saw "uount /sys/cfs". Sometimes being up too late at night you got to misspell something.
--
Quang
Offline