• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Boot from SDcard with Alpha 6  (Read 6782 times)
hypn0toad
Newbie
*

Karma: 0
Posts: 29


View Profile
« on: August 10, 2009, 09:17:10 PM »

just wanted to post this here to point out how i got this working.

when stopping uboot i couldnt quite follow the procedure at http://plugcomputer.org/plugwiki/index.php/SD_Card_As_Root_File_System , it would say that it couldnt find the environment variable bootargs, however there was an argument which WAS promising:

Code:
printenv bootargs_root
bootargs_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs

with this i tried
Code:
setenv bootargs_root root=/dev/mmcblk0p1
boot

unfortunately it did not work, and i got the error message:
Code:
FS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mmcblk0p1=rw,relatime" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            4096 mtdblock0 (driver?)
1f01          519168 mtdblock1 (driver?)
b300         7974912 mmcblk0 driver: mmcblk
  b301         7973824 mmcblk0p1

after messing around with it some, this does work:
Code:
setenv bootargs_root root=b301
boot

i tested it out and then did the setenv command followed by a saveenv command and it persisted through reboot.  here is a comparison of the file system before and after- it seems to be working properly. for the moment at least....

before:
Code:
df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   256904         0    256904   0% /lib/init/rw
varrun                  256904        36    256868   1% /var/run
varlock                 256904         0    256904   0% /var/lock
udev                    256904       112    256792   1% /dev
tmpfs                   256904         0    256904   0% /dev/shm
rootfs                  471428    184848    281744  40% /
mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)

after:
Code:
df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   256904         0    256904   0% /lib/init/rw
varrun                  256904        36    256868   1% /var/run
varlock                 256904         0    256904   0% /var/lock
udev                    256904       112    256792   1% /dev
tmpfs                   256904         0    256904   0% /dev/shm
rootfs                 7848580    449400   7000492   7% /
mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)

hope that is helpful if someone else is trying to do this... i updated the wiki with this information http://plugcomputer.org/plugwiki/index.php/SD_Card_As_Root_File_System#Write_u-boot_environment_to_flash_if_desired.
« Last Edit: August 10, 2009, 09:22:01 PM by hypn0toad » Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #1 on: August 10, 2009, 09:45:28 PM »

Thank you for the explicit instructions.  I am planning to do this in the near term.  Currently running the version from the box, copied to an SDCard, and changing the bootarg env variable, and setenv; aa in one of the earlier instructions posted at our Wiki
Logged

Cordially, CqCn

boerner
Jr. Member
**

Karma: 0
Posts: 54


View Profile
« Reply #2 on: August 11, 2009, 02:48:46 PM »

I have followed the above instructions and everything seems to work well. However, when booting from the SD card I get the following errors during bootup:

EXT3-fs warning: checktime reached, running e2fsck is recommended
EXT3 FS on mmcblk0p1, internal journal
EXT3-fs: mounted filesystem with writeback data mode.
VFS: Mounted root (ext3 filesystem) on device 179:1.
Freeing init memory: 140K
 * Filesystem type 'fusectl' is not supported. Skipping mount.
 * Setting preliminary keymap...                                         [ OK ]
 * Starting kernel event manager...                                      [ OK ]
 * Loading hardware drivers...                                           [ OK ]
 * Loading kernel modules...                                             [ OK ]  * Loading manual drivers...
 * Setting kernel variables (/etc/sysctl.conf)...                               Unknown HZ value! (94) Assume 100.
                                                                         [ OK ]
 * Setting kernel variables (/etc/sysctl.d/10-console-messages.conf)...         Unknown HZ value! (94) Assume 100.
                                                                         [ OK ]
 * Setting kernel variables (/etc/sysctl.d/10-network-security.conf)...         Unknown HZ value! (94) Assume 100.
                                                                         [ OK ]
 * Setting kernel variables (/etc/sysctl.d/10-process-security.conf)...         Unknown HZ value! (94) Assume 100.
                                                                         [ OK ]

The system seems to boot and run fine. I removed the SD card with the root file system and restarted the plug this time telling u-boot to boot from internal flash and those errors disappeared. I did a quick google and saw one user with Gentoo on a plug experiencing something similar but not quite the same (he hasn't solved his problem either). Anyone have any idea what might be causing the errors? The files should be exactly the same on both the flash and the SD card....

Thanks in advance
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #3 on: August 11, 2009, 07:37:56 PM »

This all looks fairly normal.  I also get the 94->100Hz complaints, and googling them seems to indicate it is a common, ignorable, problem.  The checktime warning implies the file system has been around long enough that, as a precaution, the file system is due for an fsck.  Normally, rather than complain, the file system is just fscked during the boot sequence when this comes up, and then either mounted (if no troubles are found), or a reboot is done without syncing (if something is corrected).  You can use tune2fs to set the parameters for how often this should be done, but if it is consistent on every boot, and the file system is not being checked, I'd investigate why.

FWIW, I created an ext2 FS on my SDcard, since the conventional wisdom dictates ext2 is easier on writes than ext3, which should theoretically extend the longevity of NAND/NOR devices (and the underlying SDcard memory is NAND).  The OS seems to run a mini-fsck on the root FS each time the Plug is not shut down cleanly.  I've had good luck with ext2 so far, although YMMV.
Logged

Kai-t
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #4 on: December 19, 2009, 01:40:50 PM »

Hello i have a problem booting from SD-Card
I followed instructions here and here
http://plugcomputer.org/plugwiki/index.php/SD_Card_As_Root_File_System
Nothing works for me.
I tried with
setenv bootargs_root root=b301
and with
setenv bootcmd 'mmcinit; setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
additionally.

But it allways ends up with:
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mmcblk0p1" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            4096 mtdblock0 (driver?)
1f01          519168 mtdblock1 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c00309c0>] (unwind_backtrace+0x0/0xe0) from [<c003db50>] (panic+0x50/0x120)
[<c003db50>] (panic+0x50/0x120) from [<c0008ec0>] (mount_block_root+0x1d4/0x214)
[<c0008ec0>] (mount_block_root+0x1d4/0x214) from [<c0009168>] (prepare_namespace+0x16c/0x1c4)
[<c0009168>] (prepare_namespace+0x16c/0x1c4) from [<c0008734>] (kernel_init+0xc0/0xec)
[<c0008734>] (kernel_init+0xc0/0xec) from [<c0040b3c>] (do_exit+0x0/0x6ac)

In this case i tried with bootargs_root root=mmcblk0p1.
I am very confused that only
1f00            4096 mtdblock0 (driver?)
1f01          519168 mtdblock1 (driver?)
are listed, my MMC card is not.

But MMCINIT works with this output:
SDHC found. Card desciption is:
Manufacturer:       0x02, OEM "TM"
Product name:       "SD04G", revision 3.8
Serial number:      3147192883
Manufacturing date: 11/2008
CRC:                0x00, b0 = 0


Has someone i idea to this and can help me booting from my mmc.
I really need help with this :-(

Best regards
Kai
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #5 on: December 19, 2009, 06:21:45 PM »

Try root=/dev/mmcblk0p1, it may work better.

Good luck Smiley
Logged

Good Luck Smiley

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #6 on: December 19, 2009, 11:13:57 PM »

Unless I'm misreading something, it looks like you are attempting to boot from the internal NAND memory.  If you really want to boot from the SD-card, you should try something like:

Code:
bootcmd_allmmc=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); mmcinit; ext2load mmc 0 0x800000 /uImage; bootm 0x800000
bootcmd=run bootcmd_allmmc

It looks as if the nand boot is succeeding, and then panicing.  But, without knowing what is on the NAND it is impossible to delve into it further.
Logged

Pages: [1]
Print
Jump to: