Thank you so much for posting this. It was a life (and time) saver! So much
simpler than the options found elsewhere, AND reversible. I do still get the
annoying fdisk run if I just power down without doing a "shutdown -h now":
Checking root file system...
fsck 1.37 (21-Mar-2005)
e2fsck 1.37 (21-Mar-2005)
/dev/sdcard0/disc0/part3 was not cleanly unmounted, check forced.
...
But, I guess this is to be expected after an unexpected power outage. I may
still see if I can find a way around this, however.
Thanks again!
Don
--- In "lucho_ortega" <> wrote:
>
>
> I have tried to boot to an SD Card for a while and was not totally
> satisfied with the results. At first I was booting to TS-Linux and that
> chroot'ing to an USB drive. Of course having a TS-7260 with an SD Card
> option my goal was to boot from this device. Just for the record, I
> bought a 4 GB SD card. At first I had issues trying to copy the file
> system to it by dd'ing one of the TS-7300 images available. I do not
> know if this is really a solution but I ran mke2fs with the -c option.
> This process took several hours to complete but after that I was able to
> create the file system. Of course I had to use fdisk to adjust the
> partition size and also had to extend the partition as explained
> somewhere in the wiki.
>
> One I had the file system with the Sarge distribution I followed the
> instruction from the wiki on booting to an SD card on a TS-7260.
> Unfortunately I could not get it to boot without having to do a force
> fsck in every reboot. I would get different time span forcing the
> reboot, depending on which kernel image I would use to boot. I am not
> sure why this happened but it did.
>
> I decided to understand what the intermediate file system in initrd did
> and the whole secret resides in the linuxrc script. It is a very simple
> script that pivot_root's to the Debian file system that is located in
> partition 3.
>
> I thought about the process recommended to boot to this image in
> partition 3 and came to the conclusion that, first I do not need to
> change the kernel the TS-7260 comes with. Second, I do not need to load
> to flash that intermediate file system containing the linuxrc script.
>
> What I did was a minor change to the redboot script and placed the the
> linuxrc script in the on-board file system.
>
> the script for redboot is as follows:
>
> fis load vmlinux
> exec -c "console=ttyAM0,115200 root=/dev/mtdblock1 init=/root/linuxrc
> rw"
>
>
> As you can see the change is at the end of the regular exec line, where
> I added the init and rw parameters. I placed the linuxrc script in
> /root.
>
> #!/bin/sh
>
> # I added real time clock time transfer to system
> hwclock -s
>
> cd /
> mount -t proc proc /proc
> insmod -f sdcard.o -o sdcard0 dmaenable=1 #>/dev/null 2>&1
> mount /dev/sdcard0/disc0/part3 /mnt #>/dev/null 2>&1
> cd /mnt
> pivot_root . tmp
> /bin/umount tmp/proc
> /bin/mount -n --move tmp/dev /dev
> /bin/mount -t proc proc /proc
> exec /usr/sbin/chroot . /bin/sh <<- EOF
> /bin/umount tmp
> exec /sbin/init
> EOF
>
>
> I did a minor addition as you may see above and that was to add the
> setting of the system clock from the real time clock I have on my board.
> Before adding this line I was getting the following as the file system
> was mounted ( I am not sure about the reason):
>
> /dev/sdcard0/disc0/part3 has gone 13590 days without being checked,
> check forced.
>
> I do not get that anymore.
>
> I still have the original kernel and the original file system. Should I
> find the need to boot to it I would interrupt redboot and change the
> exec command not to use the init=/root/linuxrc parameter. Things could
> not get any simpler.
>
> For whatever it is worth there you have it. I hope it is useful to
> someone else. Thinking about it I could have placed the file system on
> partition 1 but with a 4 GB SD card it is not worth the effort.
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|