New IT forum Follow us on Twitter
23 May 2012, 05:06:50 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: TonidoPlug2 - Now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to Install Debian on SheevaPlug supplied SD card?  (Read 2813 times)
soulgazer
Newbie
*
Posts: 4


« on: 09 November 2009, 04:13:40 pm »

I've just received my SheevaPlug with supplied 4GB SD card.

I'm able to connect using putty and serial interface (PC) and ubuntu seems to be running nicely.

Martin Michlmayr has provided this excellent guide on how to put Debian on the SD Card (http://www.cyrius.com/debian/kirkwood/sheevaplug/) - but I'm looking for some pointers for the best approach when I already have ubuntu pre-installed accompanying the SheevaPlug.
 
Please note that I would like to have 2 partitions, 1 boot and 1 data. (Can't tell if the SD card is already partitioned)

* Boot the SheevaPlug using the SD Card and then FDISK the SD card and install Debian?
* Just install Debian and partition afterwards?
* Something other I haven't thought of?

Hope you can help me out

soulgazer
« Last Edit: 09 November 2009, 09:31:11 pm by soulgazer » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #1 on: 09 November 2009, 11:11:07 pm »

The best approach would probably have been to start with a plain factory build. The process that we used to configure your system is very similar to one of the procedures listed at cyrius.com. This one:

http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html

Now, I haven't performed an Ubuntu install but I know a man who has, and the advice that was given to me is that this second method is more versatile, and allows for greater choice in the resulting configuration:

http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html

Although this second article doesn't explicitly state it, the instructions there provide examples for writing the filesystem to an SD card that is mounted in the SheevaPlug. Right now, on your plug, you cannot do this, since the only bootable operating system that you have relies on using that SD card slot for the operating system. However (and I haven't tested this), you should be able to use a different PC (ie your desktop), with a card reader / writer, to write to a new card.

In both cases there is an issue with the U-Boot config; you have to make sure that the settings that allow your system to boot now are the same as the settings that would allow you to boot from the debian card.

If I were in your shoes I would:

  • Make sure I can read and write SD cards on a PC other than the Sheevaplug
  • Using that reader / writer, make an image of your current SD card to a file on your PC. Keep this image safe; it will enable you to restore your system to its current state if you ever break the configuration on the SD card. You can also take snapshots from time to time in the future.
  • Obtain a second SD card
  • Unpack the image listed on the cyrius.com page and copy it to your second SD card using card reader / writer and your PC (not the Sheevaplug)
  • Review, copy, check and re-check the U-Boot settings. Follow the instructions on the cyrius.com Unpack page and test your SheevaPlug for booting from this second card.
  • Congratulations! You now have a plug that can be booted into either debian or Ubuntu, simply by switching SD cards.
  • Take snapshots of these cards from time to time.

I don't think that partitioning is critical. Solid state memory should be truly Random in its access. The defaults suggested on other sites should be fine. If you want to create a separate partition and mount it, you should be OK. But I'm not convinced that logical partitions are useful on an SD card. The card you are currently using should show this:

~# df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 251M     0  251M   0% /lib/init/rw
varrun                251M   36K  251M   1% /var/run
varlock               251M     0  251M   0% /var/lock
udev                  251M  116K  251M   1% /dev
tmpfs                 251M     0  251M   0% /dev/shm
rootfs                3.7G  368M  3.1G  11% /


and this:

~# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes
4 heads, 16 sectors/track, 121008 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1               1         123        3928   83  Linux
/dev/mmcblk0p2             124      121008     3868320   83  Linux


Whereas the cyrius page suggests this:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         110      883543+  83  Linux
/dev/sda2             111         125      120487+  82  Linux swap


There may be an implication here with regard to the boot address. I haven't had a chance to test either of these procedures, but I hope to try them out soon.

Hope this helps.
Logged
soulgazer
Newbie
*
Posts: 4


« Reply #2 on: 10 November 2009, 09:10:04 pm »

Hi Marcus

Thank You for the excellent instructions. Will dive in to them when I get my additional SD card.

Best regards

soulgazer
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!