booting from SD card

Discussion about U-Boot and the kernel.

booting from SD card

Postby replabrobin » Sat Dec 11, 2010 1:53 pm

I have tried to boot Arch Linux ARM install from an SD card, but am having problems related to the disk mounts. The SD is partitioned

$this->bbcode_second_pass_quote('', '/')boot ext2 10Mb
/ ext2 6.9Gb
swap swap 1Gb


my fstab looks like

$this->bbcode_second_pass_quote('', '#') cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot ext2 defaults,noatime 0 1
/dev/mmcblk0p2 / ext2 defaults,noatime 0 1
/dev/mmcblk0p3 swap swap defaults 0 0
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0


The boot proceeds normally starting like this
$this->bbcode_second_pass_quote('', 'U')SB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0
SDHC found. Card desciption is:
Manufacturer: 0x02, OEM "TM"
Product name: "SD08G", revision 3.8
Serial number: 3221812274
Manufacturing date: 9/2008
CRC: 0x00, b0 = 0

2935340 bytes read
## Booting image at 00800000 ...
Image Name: Linux-2.6.36
Created: 2010-12-02 8:37:06 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2935276 Bytes = 2.8 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36 (root@Arch Linux ARM install) (gcc version 4.4.3 (GCC) ) #1 PREEMPT Thu De
c 2 02:36:31 CST 2010
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell SheevaPlug Reference Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootdelay=5
PID hash table entries: 2048 (order: 1, 8192 bytes)
...


but it fails during fsck phase with the message$this->bbcode_second_pass_quote('', ':'): Mounting Root Read-only [DONE]
:: Checking Filesystems [BUSY] root: clean, 44706/421824 files, 151208/1686784 blocks
/dev/mmcblk0p1 is mounted. e2fsck: Cannot continue, aborting.


[FAIL]

***************** FILESYSTEM CHECK FAILED ****************
* *
* Please repair manually and reboot. Note that the root *
* file system is currently mounted read-only. To remount *
* it read-write type: mount -n -o remount,rw / *
* When you exit the maintenance shell the system will *
* reboot automatically. *
* *
************************************************************

Give root password for maintenance
(or type Control-D to continue):

I entered maintenance mode and then see the following disks are mounted

$this->bbcode_second_pass_quote('', '
')root@(none) ~:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 6641192 498888 5804948 8% /
udev 10240 120 10120 2% /dev
/dev/mmcblk0p1 9911 4127 5272 44% /media/sd-mmcblk0p1
/dev/mmcblk0p2 6641192 498888 5804948 8% /media/sd-mmcblk0p2
devpts 10240 120 10120 2% /dev/pts
shm 10240 120 10120 2% /dev/shm
/dev/mmcblk0p2 6641192 498888 5804948 8% /media/sd-mmcblk0p2
/dev/mmcblk0p1 9911 4127 5272 44% /media/sd-mmcblk0p1
root@(none) ~:
# ls /media
sd-mmcblk0p1 sd-mmcblk0p2 sd-mmcblk0p3
so I have obviousy got something fairly basic wrong. How to I get the card to be used without ubi and how do I stop it being mounted twice?
replabrobin
 
Posts: 108
Joined: Tue Nov 30, 2010 11:18 am
Top

Re: booting from SD card

Postby falker » Sat Dec 11, 2010 5:16 pm

A quick fix would be to disable disk checking on boot. Or look at the udev automount rules.
falker
 
Posts: 24
Joined: Sat Jul 10, 2010 2:45 pm

Re: booting from SD card

Postby replabrobin » Sat Dec 11, 2010 10:44 pm

$this->bbcode_second_pass_quote('falker', 'A') quick fix would be to disable disk checking on boot. Or look at the udev automount rules.

well after removing the rules 11-media-by-label-auto-mount.rules 11-sd-cards-auto-mount.rules in /etc/udev/rules.d it works as expected and I now see these mounts
$this->bbcode_second_pass_code('', '/dev/root on / type ext2 (rw,noatime,errors=continue)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
/dev/mmcblk0p1 on /boot type ext2 (rw,noatime)
devpts on /dev/pts type devpts (rw)
shm on /dev/shm type tmpfs (rw,nosuid,nodev)
') I'm not sure why I see /dev/root rather than /dev/mmcblk0p2 which is what is specified in /etc/fstab, but I'm not seeing ubi anywhere at least.
replabrobin
 
Posts: 108
Joined: Tue Nov 30, 2010 11:18 am
Top


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 9 guests