[Solved] Multiple partition setup issues

This forum is for discussion about general software issues.

[Solved] Multiple partition setup issues

Postby john3voltas » Fri Apr 24, 2020 12:17 am

Hi there,
I like to keep the rootfs and boot in separate ext4 and ext2 partitions, respectively,
For that in the past I have used this tutorial.
viewtopic.php?f=30&t=1325&start=10

It just so happens that my old pendisk has died and I had to buy another one and I am trying to reinstall using the same tutorial but it is failing me with a kernel panic.

Here is a copy of the env:
$this->bbcode_second_pass_code('', 'DockStar> printenv
baudrate=115200
bootcmd=usb start; setenv letter 9;for type in usb; do for disk in 0 1 2 3; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done;
bootdelay=3
bootm=echo Booting from ${disk} ...; run setargs; bootm ${loadaddr};
bootz=echo Booting from ${disk} ...; run setargs; bootz ${loadaddr} - ${fdt_addr};
console=ttyS0
ethact=egiga0
fdt_addr=0x800000
fdt_file=/boot/dtbs/kirkwood-dockstar.dtb
importbootenv=echo Importing environment (uEnv.txt)...; env import -t $loadaddr $filesize
load=echo Attempting to boot from ${type} ${disk}:1...;if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set ...;if test -n $uenvcmd; then ech;
loadaddr=0x810000
loadbootenv=load ${type} ${disk}:1 ${loadaddr} /boot/uEnv.txt
loadfdt=load ${type} ${disk}:1 ${fdt_addr} ${fdt_file}
loaduimage=load ${type} ${disk}:1 ${loadaddr} ${uimage}
loadzimage=load ${type} ${disk}:1 ${loadaddr} ${zimage}
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts}
uimage=/boot/uImage
usb_rootfstype=ext4
usb_scan_1=usb=0:1 dev=sda2
usb_scan_2=usb=1:1 dev=sdb2
usb_scan_3=usb=2:1 dev=sdc2
usb_scan_4=usb=3:1 dev=sdd2
zimage=/boot/zImage

Environment size: 1537/131068 bytes
DockStar> ')

And here is a copy of the boot log using the serial:
$this->bbcode_second_pass_code('', 'U-Boot 2014.04.R4-1 (May 28 2014 - 22:13:12) Arch Linux ARM
Seagate FreeAgent DockStar

SoC: Kirkwood 88F6281_A0
DRAM: 128 MiB
WARNING: Caches not enabled
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
Warning: failed to set MAC address

88E1116 Initialized on egiga0
Hit any key to stop autoboot: 0
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

Partition Map for USB device 0 -- Partition Type: DOS

Part Start Sector Num Sectors UUID Type
1 2048 512000 04822a80-01 83
2 514048 5464064 04822a80-02 83
3 5978112 1843200 04822a80-03 82
Attempting to boot from usb 0:1...
** File not found /boot/uEnv.txt **
Checking if uenvcmd is set ...
Running default loadzimage ...
** File not found /boot/zImage **
Running default loaduimage ...
4622488 bytes read in 511 ms (8.6 MiB/s)
Booting from 0 ...
## Booting kernel from Legacy Image at 00810000 ...
Image Name: Linux-4.4.213-1-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4622424 Bytes = 4.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.213-1-ARCH (builduser@leming) (gcc version 9.2.0 (GCC) ) #1 PREEMPT Fri Feb 7 05:49:05 UTC 2020
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Seagate FreeAgent DockStar
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rw rootwait mtdparts=orion_nand:1M(u-boot),-(rootfs)
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 119668K/131072K available (6614K kernel code, 548K rwdata, 1892K rodata, 300K init, 720K bss, 11404K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0856bbc (8507 kB)
[ 0.000000] .init : 0xc0857000 - 0xc08a2000 ( 300 kB)
[ 0.000000] .data : 0xc08a2000 - 0xc092b29c ( 549 kB)
[ 0.000000] .bss : 0xc092b29c - 0xc09df428 ( 721 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:114
[ 0.000012] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 13.242229] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 13.242414] Console: colour dummy device 80x30
[ 13.242441] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[ 13.332313] pid_max: default: 32768 minimum: 301
[ 13.332400] Security Framework initialized
[ 13.332473] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 13.332490] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 13.333213] Initializing cgroup subsys io
[ 13.333246] Initializing cgroup subsys memory
[ 13.333296] Initializing cgroup subsys devices
[ 13.333322] Initializing cgroup subsys freezer
[ 13.333343] Initializing cgroup subsys net_cls
[ 13.333362] Initializing cgroup subsys perf_event
[ 13.333384] Initializing cgroup subsys net_prio
[ 13.333463] CPU: Testing write buffer coherency: ok
[ 13.333930] Setting up static identity map for 0x81e0 - 0x8238
[ 13.335900] devtmpfs: initialized
[ 13.338242] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 13.338280] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 13.338769] pinctrl core: initialized pinctrl subsystem
[ 13.339514] NET: Registered protocol family 16
[ 13.340023] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 13.362317] cpuidle: using governor ladder
[ 13.392315] cpuidle: using governor menu
[ 13.392483] Kirkwood: MV88F6281-A0, TCLK=200000000.
[ 13.392506] Feroceon L2: Enabling L2
[ 13.392544] Feroceon L2: Cache support initialised.
[ 13.433808] vgaarb: loaded
[ 13.434143] SCSI subsystem initialized
[ 13.434626] usbcore: registered new interface driver usbfs
[ 13.434700] usbcore: registered new interface driver hub
[ 13.434760] usbcore: registered new device driver usb
[ 13.434928] pps_core: LinuxPPS API ver. 1 registered
[ 13.434937] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 13.434968] PTP clock support registered
[ 13.435998] clocksource: Switched to clocksource orion_clocksource
[ 13.474837] FS-Cache: Loaded
[ 13.487806] NET: Registered protocol family 2
[ 13.488605] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 13.488629] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 13.488648] TCP: Hash tables configured (established 1024 bind 1024)
[ 13.488720] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 13.488742] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 13.488944] NET: Registered protocol family 1
[ 13.489275] RPC: Registered named UNIX socket transport module.
[ 13.489286] RPC: Registered udp transport module.
[ 13.489292] RPC: Registered tcp transport module.
[ 13.489299] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 13.504004] VFS: Disk quotas dquot_6.6.0
[ 13.504272] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 13.506394] FS-Cache: Netfs 'nfs' registered for caching
[ 13.507496] NFS: Registering the id_resolver key type
[ 13.507554] Key type id_resolver registered
[ 13.507562] Key type id_legacy registered
[ 13.507650] jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
[ 13.508959] fuse init (API version 7.23)
[ 13.511161] aufs 4.4-20170911
[ 13.516707] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 13.516728] io scheduler noop registered
[ 13.516741] io scheduler deadline registered
[ 13.517005] io scheduler cfq registered
[ 13.517261] io scheduler bfq registered (default)
[ 13.517270] BFQ I/O-scheduler: v7r11
[ 13.517460] mv_xor mv_xor.0: Marvell shared XOR driver
[ 13.557132] mv_xor mv_xor.0: Marvell XOR (Registers Mode): ( xor cpy )
[ 13.557375] mv_xor mv_xor.1: Marvell shared XOR driver
[ 13.597167] mv_xor mv_xor.1: Marvell XOR (Registers Mode): ( xor cpy )
[ 13.602746] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 13.603850] console [ttyS0] disabled
[ 13.623961] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[ 14.176894] console [ttyS0] enabled
[ 14.196079] brd: module loaded
[ 14.206801] loop: module loaded
[ 14.210865] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[ 14.217338] nand: Micron MT29F2G08AAD
[ 14.221021] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 14.228652] Scanning device for bad blocks
[ 14.245613] Bad eraseblock 168 at 0x000001500000
[ 14.251447] Bad eraseblock 184 at 0x000001700000
[ 14.261233] Bad eraseblock 252 at 0x000001f80000
[ 14.269040] Bad eraseblock 294 at 0x0000024c0000
[ 14.281723] Bad eraseblock 400 at 0x000003200000
[ 14.316434] Bad eraseblock 795 at 0x000006360000
[ 14.331782] Bad eraseblock 936 at 0x000007500000
[ 14.341802] Bad eraseblock 1007 at 0x000007de0000
[ 14.349774] Bad eraseblock 1050 at 0x000008340000
[ 14.377325] Bad eraseblock 1350 at 0x00000a8c0000
[ 14.386597] Bad eraseblock 1410 at 0x00000b040000
[ 14.422600] Bad eraseblock 1821 at 0x00000e3a0000
[ 14.444565] 2 cmdlinepart partitions found on MTD device orion_nand
[ 14.450876] Creating 2 MTD partitions on "orion_nand":
[ 14.456052] 0x000000000000-0x000000100000 : "u-boot"
[ 14.461518] 0x000000100000-0x000010000000 : "rootfs"
[ 14.474118] libphy: orion_mdio_bus: probed
[ 14.478385] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[ 15.556944] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:00:00:00:00:00
[ 15.565825] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 15.572421] ehci-pci: EHCI PCI platform driver
[ 15.576972] ehci-orion: EHCI orion driver
[ 15.581070] orion-ehci orion-ehci.0: EHCI Host Controller
[ 15.586541] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[ 15.594288] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[ 15.616028] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[ 15.622939] hub 1-0:1.0: USB hub found
[ 15.626794] hub 1-0:1.0: 1 port detected
[ 15.631426] usbcore: registered new interface driver uas
[ 15.636949] usbcore: registered new interface driver usb-storage
[ 15.643038] usbcore: registered new interface driver ums-alauda
[ 15.649084] usbcore: registered new interface driver ums-cypress
[ 15.655184] usbcore: registered new interface driver ums-datafab
[ 15.661292] usbcore: registered new interface driver ums_eneub6250
[ 15.667574] usbcore: registered new interface driver ums-freecom
[ 15.673658] usbcore: registered new interface driver ums-isd200
[ 15.679679] usbcore: registered new interface driver ums-jumpshot
[ 15.685849] usbcore: registered new interface driver ums-karma
[ 15.691783] usbcore: registered new interface driver ums-onetouch
[ 15.697994] usbcore: registered new interface driver ums-realtek
[ 15.704084] usbcore: registered new interface driver ums-sddr09
[ 15.710104] usbcore: registered new interface driver ums-sddr55
[ 15.716120] usbcore: registered new interface driver ums-usbat
[ 15.722426] mousedev: PS/2 mouse device common for all mice
[ 15.946027] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 16.098798] hub 1-1:1.0: USB hub found
[ 16.102924] hub 1-1:1.0: 4 ports detected
[ 16.386022] usb 1-1.4: new high-speed USB device number 3 using orion-ehci
[ 16.497960] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 16.504591] scsi host0: usb-storage 1-1.4:1.0
[ 16.736022] rtc-mv rtc-mv: internal RTC not ticking
[ 16.741068] i2c /dev entries driver
[ 16.745107] sdhci: Secure Digital Host Controller Interface driver
[ 16.751346] sdhci: Copyright(c) Pierre Ossman
[ 16.755781] sdhci-pltfm: SDHCI platform and OF driver helper
[ 16.761958] ledtrig-cpu: registered to indicate activity on CPUs
[ 16.768156] usbcore: registered new interface driver r8712u
[ 16.774007] gre: GRE over IPv4 demultiplexor driver
[ 16.778981] NET: Registered protocol family 17
[ 16.783566] Key type dns_resolver registered
[ 16.788884] registered taskstats version 1
[ 16.794836] Key type encrypted registered
[ 16.799496] console [netcon0] enabled
[ 16.803177] netconsole: network logging started
[ 16.807875] hctosys: unable to open rtc device (rtc0)
[ 16.814179] Waiting for root device /dev/sda1...
[ 17.507516] scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.26 PQ: 0 ANSI: 5
[ 17.516894] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 17.522745] sd 0:0:0:0: [sda] 7821312 512-byte logical blocks: (4.00 GB/3.73 GiB)
[ 17.532077] sd 0:0:0:0: [sda] Write Protect is off
[ 17.537701] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 17.552943] sda: sda1 sda2 sda3
[ 17.559702] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 17.587464] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[ 17.596332] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 17.611404] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[ 17.618625] VFS: Mounted root (ext2 filesystem) on device 8:1.
[ 17.625227] devtmpfs: error mounting -2
[ 17.630038] Freeing unused kernel memory: 300K
[ 17.634575] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 17.647766] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.213-1-ARCH #1
[ 17.654230] Hardware name: Seagate FreeAgent DockStar
[ 17.659323] [<c000fd58>] (unwind_backtrace) from [<c000d3dc>] (show_stack+0x10/0x14)
[ 17.667111] [<c000d3dc>] (show_stack) from [<c00cc808>] (panic+0x9c/0x21c)
[ 17.674026] [<c00cc808>] (panic) from [<c064b140>] (kernel_init+0xb4/0xe0)
[ 17.680938] [<c064b140>] (kernel_init) from [<c000a4e8>] (ret_from_fork+0x14/0x2c)
[ 17.688545] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 81.616019] random: nonblocking pool is initialized
')

Here is my current fstab:
$this->bbcode_second_pass_code('', '/dev/sda1 /boot ext2 defaults,noatime 1 2')

Have already tried this fstab as per the tutorial with the same results:
$this->bbcode_second_pass_code('', '/dev/sda1 /boot ext2 defaults,noatime 1 2
/dev/sda2 / ext4 noatime 0 1')

What could I possibly be doing wrong...
Thanks in advance.

Cheers
Last edited by john3voltas on Sun Apr 26, 2020 12:56 pm, edited 1 time in total.
Seagate Dockstar
128MB RAM - 256 NAND
U-Boot 2016.09.01-1
john3voltas
 
Posts: 32
Joined: Mon Aug 16, 2010 3:42 pm

Re: Multiple partition setup issues

Postby moonman » Fri Apr 24, 2020 4:28 am

That thread is really, really old and does not apply to your uboot at all since u-boot environment has changed a lot.

$this->bbcode_second_pass_code('', 'usb_rootfstype=ext4
usb_scan_1=usb=0:1 dev=sda2
usb_scan_2=usb=1:1 dev=sdb2
usb_scan_3=usb=2:1 dev=sdc2
usb_scan_4=usb=3:1 dev=sdd2')
This has no effect all.

$this->bbcode_second_pass_quote('', 's')etargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts}

Your uboot still passes /dev/sdX1 to the kernel, which means it assumes the rootfs is on the first partition and not the second like you want. You want that line to say root=/dev/sd${letter}2.

This will make it boot up. Now you have second problem:
According to your fstab you will mount sdX1 under /boot on your rootfs. This will make it /boot to be the mount point. but all files will reside in the root of the first partition. Any kernel update will place the files in the root of the first partition instead of in /boot of the first partition. Your uboot expects them in /boot.

So you will either have to change uboot's fdt_file= uImage= and zImage= variables OR use bind mount to compensate for that.

Thirdly you can actually start using linux-kernel-fdt kernel.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Multiple partition setup issues

Postby john3voltas » Sat Apr 25, 2020 11:24 pm

$this->bbcode_second_pass_quote('', 'T')hat thread is really, really old and does not apply to your uboot at all since u-boot environment has changed a lot.

$this->bbcode_second_pass_code('', 'usb_rootfstype=ext4
usb_scan_1=usb=0:1 dev=sda2
usb_scan_2=usb=1:1 dev=sdb2
usb_scan_3=usb=2:1 dev=sdc2
usb_scan_4=usb=3:1 dev=sdd2
')

This has no effect all.

Oh. I didn't know that.

$this->bbcode_second_pass_quote('', '
')$this->bbcode_second_pass_code('', 'setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts}')
Your uboot still passes /dev/sdX1 to the kernel, which means it assumes the rootfs is on the first partition and not the second like you want. You want that line to say root=/dev/sd${letter}2.

This will make it boot up.

Done. And it did the trick.

$this->bbcode_second_pass_quote('', 'N')ow you have second problem:
According to your fstab you will mount sdX1 under /boot on your rootfs. This will make it /boot to be the mount point. but all files will reside in the root of the first partition. Any kernel update will place the files in the root of the first partition instead of in /boot of the first partition. Your uboot expects them in /boot.

I get it but but it's getting a bit harder to understand. I'm not very familiar with mounting points, symlinks, uboots and whatnot.
For now, I've created the symlink for the kernel and it was working fine. The system booted the kernel and mounted the rootfs on different partitions.

$this->bbcode_second_pass_quote('', 'T')hirdly you can actually start using linux-kernel-fdt kernel.

Glad you introduced that.
I need to be on kernel 5 and since ALARM comes with kernel 4 my only option is to go for fdt.
But since I was on an old u-boot and I was told that I needed a recent u-boot for fdt kernel, I decided to take the red pill and install uboot-dockstar package.
All fine. u-boot updated. But...now the system will not boot...

My current env
$this->bbcode_second_pass_code('', 'DockStar> printenv
baudrate=115200
bootcmd=run startboot; run bootubi
bootdelay=3
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...; if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile}; ubifsumount; setenv boi
console=ttyS0,115200
ethact=egiga0
ethaddr=00:10:75:1A:BD:D7
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-dockstar.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists nci
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; for devtype in usb; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1;

Environment size: 2767/131068 bytes
DockStar> saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xc0000 -- 100% complete.
Writing to NAND... OK
DockStar> reset
resetting ...')

And this a bootlog with the new u-boot
$this->bbcode_second_pass_code('', 'U-Boot 2016.09.01-1 (Oct 10 2016 - 23:10:58 -0600) Arch Linux ARM
Seagate FreeAgent DockStar

SoC: Kirkwood 88F6281_A0
DRAM: 128 MiB
WARNING: Caches not enabled
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
88E1116 Initialized on egiga0
No link on egiga0
ping failed; host 10.10.10.5 is not alive
Hit any key to stop autoboot: 0
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

USB device 0:
Device 0: Vendor: Generic- Rev: 1.00 Prod: SD/MMC
Type: Removable Hard Disk
Capacity: 30532.0 MB = 29.8 GB (62529536 x 512)
... is now current device
usb found on device 0
Checking for: /boot/uEnv.txt ...
** File not found /boot/zImage **
4623320 bytes read in 442 ms (10 MiB/s)
loading /boot/dtbs/kirkwood-dockstar.dtb ...
** File not found /boot/dtbs/kirkwood-dockstar.dtb **
7757095 bytes read in 581 ms (12.7 MiB/s)
## Booting kernel from Legacy Image at 00810000 ...
Image Name: Linux-4.4.219-1-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4623256 Bytes = 4.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.219-1-ARCH (builduser@leming) (gcc version 9.2.0 (GCC) ) #1 PREEMPT Fri Apr 17 06:42:50 UTC 2020
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Seagate FreeAgent DockStar
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),-(rootfs) root=PARTUUID=00715ae8-01 rw rootwait
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 112092K/131072K available (6618K kernel code, 548K rwdata, 1892K rodata, 296K init, 720K bss, 18980K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0857b74 (8511 kB)
[ 0.000000] .init : 0xc0858000 - 0xc08a2000 ( 296 kB)
[ 0.000000] .data : 0xc08a2000 - 0xc092b2dc ( 549 kB)
[ 0.000000] .bss : 0xc092b2dc - 0xc09df468 ( 721 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:114
[ 0.000012] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 6.696776] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 6.696963] Console: colour dummy device 80x30
[ 6.696989] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[ 6.786859] pid_max: default: 32768 minimum: 301
[ 6.786951] Security Framework initialized
[ 6.787026] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 6.787043] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 6.787769] Initializing cgroup subsys io
[ 6.787802] Initializing cgroup subsys memory
[ 6.787854] Initializing cgroup subsys devices
[ 6.787881] Initializing cgroup subsys freezer
[ 6.787904] Initializing cgroup subsys net_cls
[ 6.787926] Initializing cgroup subsys perf_event
[ 6.787949] Initializing cgroup subsys net_prio
[ 6.788029] CPU: Testing write buffer coherency: ok
[ 6.788500] Setting up static identity map for 0x81e0 - 0x8238
[ 6.790504] devtmpfs: initialized
[ 6.792953] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 6.792992] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 6.793483] pinctrl core: initialized pinctrl subsystem
[ 6.794257] NET: Registered protocol family 16
[ 6.794767] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 6.816865] cpuidle: using governor ladder
[ 6.846863] cpuidle: using governor menu
[ 6.847031] Kirkwood: MV88F6281-A0, TCLK=200000000.
[ 6.847057] Feroceon L2: Enabling L2
[ 6.847096] Feroceon L2: Cache support initialised.
[ 6.888375] vgaarb: loaded
[ 6.888712] SCSI subsystem initialized
[ 6.889202] usbcore: registered new interface driver usbfs
[ 6.889278] usbcore: registered new interface driver hub
[ 6.889337] usbcore: registered new device driver usb
[ 6.889507] pps_core: LinuxPPS API ver. 1 registered
[ 6.889516] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 6.889546] PTP clock support registered
[ 6.890573] clocksource: Switched to clocksource orion_clocksource
[ 6.930759] FS-Cache: Loaded
[ 6.943685] NET: Registered protocol family 2
[ 6.944484] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 6.944510] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 6.944530] TCP: Hash tables configured (established 1024 bind 1024)
[ 6.944603] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 6.944625] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 6.944828] NET: Registered protocol family 1
[ 6.945163] RPC: Registered named UNIX socket transport module.
[ 6.945174] RPC: Registered udp transport module.
[ 6.945180] RPC: Registered tcp transport module.
[ 6.945187] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 6.945499] Trying to unpack rootfs image as initramfs...
[ 7.544604] Freeing initrd memory: 7576K
[ 7.559228] VFS: Disk quotas dquot_6.6.0
[ 7.559496] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 7.561668] FS-Cache: Netfs 'nfs' registered for caching
[ 7.562781] NFS: Registering the id_resolver key type
[ 7.562850] Key type id_resolver registered
[ 7.562858] Key type id_legacy registered
[ 7.562948] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 7.564258] fuse init (API version 7.23)
[ 7.566443] aufs 4.4-20170911
[ 7.571960] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 7.571980] io scheduler noop registered
[ 7.571993] io scheduler deadline registered
[ 7.572256] io scheduler cfq registered
[ 7.572515] io scheduler bfq registered (default)
[ 7.572523] BFQ I/O-scheduler: v7r11
[ 7.572714] mv_xor mv_xor.0: Marvell shared XOR driver
[ 7.611763] mv_xor mv_xor.0: Marvell XOR (Registers Mode): ( xor cpy )
[ 7.612010] mv_xor mv_xor.1: Marvell shared XOR driver
[ 7.651715] mv_xor mv_xor.1: Marvell XOR (Registers Mode): ( xor cpy )
[ 7.657297] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 7.658398] console [ttyS0] disabled
[ 7.678510] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[ 8.241836] console [ttyS0] enabled
[ 8.261042] brd: module loaded
[ 8.271807] loop: module loaded
[ 8.275874] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[ 8.282355] nand: Micron MT29F2G08AAD
[ 8.286032] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 8.293665] Scanning device for bad blocks
[ 8.310637] Bad eraseblock 168 at 0x000001500000
[ 8.316459] Bad eraseblock 184 at 0x000001700000
[ 8.326244] Bad eraseblock 252 at 0x000001f80000
[ 8.334050] Bad eraseblock 294 at 0x0000024c0000
[ 8.346725] Bad eraseblock 400 at 0x000003200000
[ 8.381428] Bad eraseblock 795 at 0x000006360000
[ 8.396776] Bad eraseblock 936 at 0x000007500000
[ 8.406794] Bad eraseblock 1007 at 0x000007de0000
[ 8.414767] Bad eraseblock 1050 at 0x000008340000
[ 8.442316] Bad eraseblock 1350 at 0x00000a8c0000
[ 8.451581] Bad eraseblock 1410 at 0x00000b040000
[ 8.487578] Bad eraseblock 1821 at 0x00000e3a0000
[ 8.509534] 2 cmdlinepart partitions found on MTD device orion_nand
[ 8.515844] Creating 2 MTD partitions on "orion_nand":
[ 8.521020] 0x000000000000-0x000000100000 : "u-boot"
[ 8.526477] 0x000000100000-0x000010000000 : "rootfs"
[ 8.548011] libphy: orion_mdio_bus: probed
[ 8.552303] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[ 9.631489] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:1a:bd:d7
[ 9.640372] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 9.646963] ehci-pci: EHCI PCI platform driver
[ 9.651514] ehci-orion: EHCI orion driver
[ 9.655615] orion-ehci orion-ehci.0: EHCI Host Controller
[ 9.661083] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[ 9.668828] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[ 9.690602] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[ 9.697514] hub 1-0:1.0: USB hub found
[ 9.701365] hub 1-0:1.0: 1 port detected
[ 9.705995] usbcore: registered new interface driver uas
[ 9.711524] usbcore: registered new interface driver usb-storage
[ 9.717615] usbcore: registered new interface driver ums-alauda
[ 9.723658] usbcore: registered new interface driver ums-cypress
[ 9.729750] usbcore: registered new interface driver ums-datafab
[ 9.735861] usbcore: registered new interface driver ums_eneub6250
[ 9.742145] usbcore: registered new interface driver ums-freecom
[ 9.748228] usbcore: registered new interface driver ums-isd200
[ 9.754249] usbcore: registered new interface driver ums-jumpshot
[ 9.760419] usbcore: registered new interface driver ums-karma
[ 9.766352] usbcore: registered new interface driver ums-onetouch
[ 9.772574] usbcore: registered new interface driver ums-realtek
[ 9.778662] usbcore: registered new interface driver ums-sddr09
[ 9.784682] usbcore: registered new interface driver ums-sddr55
[ 9.790706] usbcore: registered new interface driver ums-usbat
[ 9.797013] mousedev: PS/2 mouse device common for all mice
[ 10.020604] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 10.173339] hub 1-1:1.0: USB hub found
[ 10.177463] hub 1-1:1.0: 4 ports detected
[ 10.460596] usb 1-1.4: new high-speed USB device number 3 using orion-ehci
[ 10.585759] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 10.592413] scsi host0: usb-storage 1-1.4:1.0
[ 10.810596] rtc-mv rtc-mv: internal RTC not ticking
[ 10.815635] i2c /dev entries driver
[ 10.819685] sdhci: Secure Digital Host Controller Interface driver
[ 10.825922] sdhci: Copyright(c) Pierre Ossman
[ 10.830358] sdhci-pltfm: SDHCI platform and OF driver helper
[ 10.836539] ledtrig-cpu: registered to indicate activity on CPUs
[ 10.842740] usbcore: registered new interface driver r8712u
[ 10.848583] gre: GRE over IPv4 demultiplexor driver
[ 10.853560] NET: Registered protocol family 17
[ 10.858146] Key type dns_resolver registered
[ 10.863461] registered taskstats version 1
[ 10.899867] Key type encrypted registered
[ 10.904711] console [netcon0] enabled
[ 10.908387] netconsole: network logging started
[ 10.913164] hctosys: unable to open rtc device (rtc0)
[ 10.920220] Freeing unused kernel memory: 296K
:: running early hook [udev]
Starting version 245.5-2-arch
:: running hook [udev]
:: Triggering uevents...
[ 11.606694] scsi 0:0:0:0: Direct-Access Generic- SD/MMC 1.00 PQ: 0 ANSI: 4
[ 11.645795] sd 0:0:0:0: Attached scsi generic sg0 type 0
Waiting 10 seconds for device /dev/disk/by-partuuid/00715ae8-01 ...
[ 12.676881] sd 0:0:0:0: [sda] 62529536 512-byte logical blocks: (32.0 GB/29.8 GiB)
[ 12.685115] sd 0:0:0:0: [sda] Write Protect is off
[ 12.690489] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 12.708108] sda: sda1 sda2 sda3
[ 12.724384] sd 0:0:0:0: [sda] Attached SCSI removable disk
:: performing fsck on '/dev/disk/by-partuuid/00715ae8-01'
/dev/sda1: clean, 16/76912 files, 24562/307200 blocks
:: mounting '/dev/disk/by-partuuid/00715ae8-01' on real root
[ 13.796131] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 13.811663] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
:: running cleanup hook [udev]
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.
')

Question: do we still need a ext2 partition for /boot ? Or can I have rootfs and /boot on the same partition with ext3/4?
If it's safe and it's easier to have all in the same partition, I'd go with that.
Otherwise I'm stuck and need a hand to make it find rootfs after having updated u-boot.

EDIT
Apparently it is possible to install and run a system on ext4 partition for as long as 64bit is deactivated when formatting the storage. I followed https://archlinuxarm.org/forum/viewtopic.php?f=53&t=12572 instructions and my system can now boot.
Are there any drawbacks when comparing this workaround and the option to boot using ext2 for /boot and ext4 for rootfs?
If so, could someone please let me know (or point me to) how I can do a multiple partition ext2/4 using later u-boots?
EDIT

Sorry for the mess.
And thanks a lot in advance.
Cheers
Seagate Dockstar
128MB RAM - 256 NAND
U-Boot 2016.09.01-1
john3voltas
 
Posts: 32
Joined: Mon Aug 16, 2010 3:42 pm
Top

Re: Multiple partition setup issues

Postby moonman » Sun Apr 26, 2020 2:26 am

1. Your 2014 version of U-Boot already supported linux-kirkwood-dt kernel. It also did support booting off of ext4 drive.
2. I was under impression you wanted to have two separate partitions for boot and rootfs.
3. I can't think of any drawbacks on these devices to have /boot within rootfs. If anything it makes things a lot simpler. If you still want to go with 2 partitions, then you can either create a file called uEnv.txt on the first partition and put in it "root=PARTUUD=xxxxxxx" or set the varialbe "root=PARTUUD=xxxxx" in the environment. You can find out partition PARTUUID with "blkid".
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Multiple partition setup issues

Postby john3voltas » Sun Apr 26, 2020 12:55 pm

$this->bbcode_second_pass_quote('moonman', '1'). Your 2014 version of U-Boot already supported linux-kirkwood-dt kernel. It also did support booting off of ext4 drive.

Ahhh, I saw many remarks on "old" u-boots not being compatible with it and I thought a 2014 might not be, hence why I went for an updated one.
$this->bbcode_second_pass_quote('moonman', '2'). I was under impression you wanted to have two separate partitions for boot and rootfs.

I did, mainly because I thought /boot had to be on ext2. But since it can now reside on ext4 too, maybe I don't.
$this->bbcode_second_pass_quote('moonman', '3'). I can't think of any drawbacks on these devices to have /boot within rootfs. If anything it makes things a lot simpler. If you still want to go with 2 partitions, then you can either create a file called uEnv.txt on the first partition and put in it "root=PARTUUD=xxxxxxx" or set the varialbe "root=PARTUUD=xxxxx" in the environment. You can find out partition PARTUUID with "blkid".

Nah, I guess I'll stick to /boot within rootfs for ease of setup/usage.
Could you please edit the other post I referred at the beginning of this topic? Just because it's a tutorial.
viewtopic.php?f=30&t=1325&start=10
Just state that it is for old u-boot and that 2014 u-boots already allow for /boot within rootfs.
Thanks a bunch for all the help/tips.
Cheers
Seagate Dockstar
128MB RAM - 256 NAND
U-Boot 2016.09.01-1
john3voltas
 
Posts: 32
Joined: Mon Aug 16, 2010 3:42 pm
Top


Return to General

Who is online

Users browsing this forum: No registered users and 17 guests