Author Topic: Root On Sd  (Read 7463 times)

niv

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Root On Sd
« Reply #15 on: August 16, 2005, 06:05:30 pm »
Thanks mate,
I am looking into /altboot-menu/15-bootSD - the scriot that will cause the filesystem to be loaded from the image file.
the only place I see the command that will mount the image is:

Code: [Select]
/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT >/dev/null 2>&1 && echo ok  >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed"
1. dont I need first to:
Code: [Select]
 losetup /dev/loop0 /media/card/opie.img
before loading the image?

2. how do I set the $SD_DEVICE $SD_MOUNTPOINT values to point to /media/card/opie.img ?

Thanks,
Niv

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
Root On Sd
« Reply #16 on: August 16, 2005, 06:17:02 pm »
Ahem, I'm a little bit confused now.

Do you try to boot a loop-image from SD or do you want to install cardfs into an already booted loop-image?
Webmaster of hentges.net & Embedded Linux Developer.

niv

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Root On Sd
« Reply #17 on: August 16, 2005, 06:39:33 pm »
already got the image file done :-)
I now seek to boot the image as root
choosing boot SD didnt work

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
Root On Sd
« Reply #18 on: August 16, 2005, 07:33:43 pm »
Please read http://www.hentges.net/misc/openzaurus/docs/altboot.shtml and make sure the naming and path are correct.
 
If that doesn't work, could you try with the latest release from http://hentges.net/tmp/altboot/ ?
« Last Edit: August 16, 2005, 07:35:42 pm by CoreDump »
Webmaster of hentges.net & Embedded Linux Developer.

niv

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Root On Sd
« Reply #19 on: August 24, 2005, 06:14:31 pm »
kindly spare a few min to help a lost soul.

Tabula rasa :
*. format the SD -> FAT on PC using a usb reader.
*. copied cardfs-opie-collie-openzaurus_oz3.5.3-opie1.2.0-r1.bin to the SD
*. Flashed to the apropriate ROM.
*. Removed all flash cards
* put in a password for the first boot
* answered no all the way utill Opie loads up. clibrated the screen
* logout
* sign in as root
* insert SD to Zaurus
* dd of=/media/card/boot-images/opie353-rootfs.bin if=/dev/zero bs=1024 count=150000
* mkfs.ext2 -F /media/card/boot-images/opie353-rootfs.bin
* losetup /dev/loop0 /media/card/boot-images/opie353-rootfs.bin
* mount -t ext2 /dev/loop0 /media/cf
* cardfsinstall.sh . OK to search. 1 to install to CF (my image)

I now need to copy my root to the image I made - right?

tried the copy_files.sh from http://openzaurus.org/wordpress/howto/root-on-sd/

I now put reboot

After rebooting I ask for 3) boot from SD

It reports that /dev/loop0 "was not cleanly unmounted" (but I did reboot!)
then it checks..
then  *** booting rootfs image ***
pivoting root .../etc/altboot-menu/15-bootSD: 259: echo: not found
/etc/altboot-menu/15-bootSD: 259: .bin.busybox: not found
/etc/altboot-menu/15-bootSD: 259: .bin.busybox: not found
exec: 259: /usr/sbin/chroot: not found

and it is stuck
« Last Edit: August 24, 2005, 06:16:37 pm by niv »

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
Root On Sd
« Reply #20 on: August 26, 2005, 01:28:42 am »
I've never used the root-on-sd scripts, sorry.
Copying the rootfs is quite easy:

- mount the image somewhere
- "cp -a" all directories, except /dev, /media, /var and /proc to the image
- mkdir image/media image/proc image/dev image/var

That should be it.
FWIW, the lastet altboot from http://hentges.net/tmp/altboot/ includes a script in the Advanced folder which does what you want. It has not been tested, though (my SD card died half-way through heh)

Installing this ipk requires you to ipkg "remove hentges-utils-altboot -force-depends"
on Hentges ROMs.
Webmaster of hentges.net & Embedded Linux Developer.

niv

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Root On Sd
« Reply #21 on: August 27, 2005, 06:15:42 pm »
[span style=\'font-size:14pt;line-height:100%\']YES[/span] (sorry I am so new to this)
It works,
10x core for your help (it does seem obios now ....)

Small note to any1 how may use the method I described. seems I need to manually do:
$ umount /dev/loop0

before rebooting to root from SD

reboot doesnt do that - and I get a warning that I didnt unmount proparly..

Well now I am thinking that we should offer this image in the reposotery.
I mean most ppl would find it easy , just to copy this file to a FAT SD and boot with your rom.

abm_y4k

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Root On Sd
« Reply #22 on: August 30, 2005, 03:45:21 pm »
Hi Coredump,

Can you make a hentges rom(3.5.4) for my C3100? I wanna give hentges rom a try and also I like to due boot feature.


Thanks,

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
Root On Sd
« Reply #23 on: September 02, 2005, 06:56:40 am »
Quote
Hi Coredump,

Can you make a hentges rom(3.5.4) for my C3100? I wanna give hentges rom a try and also I like to due boot feature.


Thanks,
[div align=\"right\"][a href=\"index.php?act=findpost&pid=93805\"][{POST_SNAPBACK}][/a][/div]

Altboot has not been ported to C3100, yet. No altboot, no dual boot  

In any case, I'm currently maintaining 3 machines for Hentges ROM (Collie, Poodle, Akita). A forth would be a little to much for one person, sorry.

I'm sure someone with a little time on their hands can configure altboot for the C3100.
Webmaster of hentges.net & Embedded Linux Developer.