USB disk as root disk on Raspberry Pi

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

USB disk as root disk on Raspberry Pi

Postby jernst » Thu Dec 08, 2016 5:16 am

Supposedly it can be made to work. Here are some instructions for Raspbian [1], which seem to boil down to "change your kernel command line to /dev/sda" (but they may be doing other magic; not sure what's on that disk)

When trying with Arch, I'm getting a kernel panic, and some strange complaining about the integrity of my (freshly created) btrfs filesystem on / (USB), but checking it from somewhere else, it seems fine. Perhaps I shoulnd't attempt btrfs in the first go...

Did anybody get this to work?




[1] https://www.dropbox.com/s/3vasu64fbvayg ... C.pdf?dl=0
jernst
 
Posts: 75
Joined: Tue Aug 20, 2013 4:22 pm
Location: Silicon Valley

Re: USB disk as root disk on Raspberry Pi

Postby jaab » Thu Dec 08, 2016 9:05 am

I have / on a USB hard disk and /boot on the sd card

$this->bbcode_second_pass_code('', '[alarm@alarmpi ~]$ cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/sda1 none swap defaults 0 0
/dev/sda2 / ext4 defaults,noatime 0 1
[alarm@alarmpi ~]$
')

My cmdline.txt
$this->bbcode_second_pass_code('', '[alarm@alarmpi boot]$ cat cmdline.txt
root=/dev/sda2 rw rootwait rootdelay=5 console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=bfq')

The elevator statement is tweaked, but there is no need to.

Regards,
jaab
 
Posts: 26
Joined: Sat Oct 22, 2016 8:32 am

Re: USB disk as root disk on Raspberry Pi

Postby jernst » Fri Dec 09, 2016 5:11 am

I got it to work with ext4 as root, but not with btrfs. Ends up in the emergency shell, and complains about filesystem integrity. Possible I'm doing something wrong, but if so, I can't think of what it might be.
jernst
 
Posts: 75
Joined: Tue Aug 20, 2013 4:22 pm
Location: Silicon Valley

Re: USB disk as root disk on Raspberry Pi

Postby summers » Mon Dec 12, 2016 11:49 am

Probably the problem is that mkinitcpio is run when there isn't a btrfs file system. So btrfs module doesn't get added to the initramdisk.

Either make sure btrfs module is loaded when you run mkinitcpio, or add btrfs to modules in /etc/mkinitcpio.conf

Needless to say, the boot partition (with kernel and initrd) can't be btrfs, as the boot loader almost certainly doesn't understand that filesystem.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 14 guests