WizardZ0mbie
Posts: 1
Joined: Fri Apr 13, 2012 6:44 pm

Re: Installing debian to a usb drive?

Fri Apr 13, 2012 7:52 pm

If I write an install image to a sd card, can I install Debian onto a usb memory stick and then let my pi boot from it after the install? Thanks

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Installing debian to a usb drive?

Sat Apr 14, 2012 5:39 pm

You always have to boot from the SD card, but, you can copy/move everything except the /boot directory to the USB drive, then edit the /boot configuration files on the SD card to point to the USB drive. Once boot is complete, the /boot directory is no longer needed, and you can remove the SD card to allow insertion of another card. You can also spread the non-boot directories across multiple USB drives, editing the boot config files appropriately.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

pvautrin
Posts: 3
Joined: Thu Apr 26, 2012 12:05 am

Re: Installing debian to a usb drive?

Thu Apr 26, 2012 1:38 am

How would one edit the config files?

In the debian6-19-04-2012.zip image, there is the cmdline.txt config file (absent from the firmware boot folder on git) which contains:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

If files are moved to first partition of USB drive (ext4), would it be as simple as replacing with root=/dev/sda1p1 ?

EDIT: Answering myself, it seems /dev/sda1 is correct

http://zenit.senecac.on.ca/wik.....or_Storage

anthonycroberts
Posts: 1
Joined: Thu Apr 19, 2012 7:43 am

Re: Installing debian to a usb drive?

Wed May 02, 2012 10:56 pm

I couldn't make this work with the Debian image.  It hangs waiting for the root device /dev/sda1.  It appears to be loading the USB drive, but it is not getting assigned a node (/dev/sda1).  Any thoughts on how to fix this?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5287
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Installing debian to a usb drive?

Wed May 02, 2012 11:17 pm

Latest kernel on GitHub enables some options needed for USB boot.

pvautrin
Posts: 3
Joined: Thu Apr 26, 2012 12:05 am

Re: Installing debian to a usb drive?

Thu May 03, 2012 1:08 am

Does this mean the SD card is no longer mandatory or just that the handover from SD to USB drive via root=.. was borked and is now fixed?

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Installing debian to a usb drive?

Thu May 03, 2012 1:20 am

SDCard will always be necessary to boot from.

Return to “General discussion”