• Home
  • Help
  • Search
  • Login
  • Register
Pages: 1 ... 3 4 [5]
Author Topic: Debian installer for SheevaPlug available now  (Read 37141 times)
pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #60 on: December 18, 2009, 06:23:53 AM »

Thank you for the information, that is what I want. I will try to incorporate them in my my build.
Logged

Good Luck Smiley

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #61 on: February 06, 2010, 04:10:40 AM »

With debian successfully installed on flash, what is the best way of making a bootable backup to the other flash option?

That is, if you can boot to SD, how do you make a copy to usb which you can boot (and then perhaps copy back to a larger SD)?
Logged

tbm
Full Member
***

Karma: 7
Posts: 121



View Profile WWW
« Reply #62 on: February 06, 2010, 06:29:11 AM »

That is, if you can boot to SD, how do you make a copy to usb which you can boot (and then perhaps copy back to a larger SD)?

Put the SD card into your Linux PC, tar up all the partitions.  Then connect the USB stick, make the same partition layout as on the SD stick, untar all the stuff.

Start the SheevaPlug and configure it to boot from USB.  You can use the instructions from my site with one change: you also have to pass root=/dev/sdaX for the root partition.  This is because the initramfs (uInitrd) contains the name of your SD root device (which you can override with root=).
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #63 on: February 06, 2010, 09:01:48 PM »

Ok, this is what I did to copy my 2gb SD to another 2gb SD.  First, on a Linux PC, I created a directory, /usb.  Then I mounted the old SD and tarred all partions excluding proc, mnt, sys.

mount /dev/sdb1 /usb
cd /usb
tar cvpzf /home/lb/sheeva.tgz --exclude=proc --exclude=lost+found --exclude=backup.tgz --exclude=mnt --exclude=sys .

This created a 500mb+ tgz file.  Then I partitioned the new SD the same as the old one, with linux partion for partition one and a 50mb swap partition on 2.  Then I formatted the drive, mounted it on /usb, extracted the tar, and created the excluded directories.

mkfs.ext2 /dev/sdb1
mount /dev/sdb1 /usb
tar xvpfz sheeva.tgz -C /usb
mkdir /usb/proc
mkdir /usb/lost+found
mkdir /usb/mnt
mkdir /usb/sys
[Edit:  modified above to refelct tbm's catch below]

I put the new SD in the Sheevaplug and powercycled, and, lo, I can ssh in as with the old SD.  Now I'm awaiting an 8gb SD from Amazon.

Thanks very much for the pointers.

Question: how should swap be handled?  Should it be set up on a ram disk?
« Last Edit: February 07, 2010, 06:48:21 AM by lyzby » Logged

tbm
Full Member
***

Karma: 7
Posts: 121



View Profile WWW
« Reply #64 on: February 07, 2010, 02:56:03 AM »

mkdir /proc
mkdir /lost+found
mkdir /mnt
mkdir /sys

This should be mkdirdir /usb/...

Question: how should swap be handled?  Should it be set up on a ram disk?

The Debian installer by default created a partition that's used for swap.  Check your /etc/fstab.
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #65 on: February 07, 2010, 07:12:59 AM »

Oops, modified code above to use "mkdir /usb/proc", etc.  Thanks.

/etc/fstab shows swap on the SD:
/dev/mmcblk0p1       /               ext3    errors=remount-ro 0       1
/dev/mmcblk0p2       none            swap    sw              0       0

My question was whether it would tend to conserve the SD if swap were on a ramdisk (which might seem a little contradictory, since ram is what is being swapped), or whether there should be no swapping.  It's not an area about which I know much, other than having seen recommendations against having swap on SD or USB flash.
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #66 on: February 07, 2010, 08:12:01 AM »

Having swap file/partiation or not depends on the use case (in ram it makes no sense...). I run the plug without swap without major issues. The problem arises during process forks when there needs to be more virtual memory. So Problems will arise before you hit the full 512MB.

To battle this you can try with swap and tune the kernel to actually not use it. This allows Process forks, but normaly won't use the swapfile (reducing wear on the flash). You can google guides on swappiness.
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #67 on: February 23, 2010, 04:26:16 PM »

As indicated above, I successfully copied a 2gb sd onto another and booted ok.  Now I have tried the same process (and actually going from the same tar file) to a 16gb sd.  The 16gb card looks ok to a casual examination--all directories in place, including the  created /proc, /sys, /mnt.  I get the Marvell>> prompt--no boot as with the 2 2gb sd cards. When I type boot, I get "SDHC found" and other identifying information, but then
** Unable to read "/boot/uInitrd" from mmc 0:1 **
** Unable to read "/boot/uImage" from mmc 0:1 **
## Booting image at 00400000 ...
Bad Magic Number

And then the Marvell>> prompt again.  Is there something obvious that I have omitted?
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #68 on: February 24, 2010, 12:42:17 AM »

did you partition your SDHC Card? And if i remember correctly there is a bug with u-boot that requires the kernel and initrd to sit below the 2GB mark.
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #69 on: February 24, 2010, 05:18:22 AM »

I did partition the SDHC card, and it appeared ok to me--that is, the same as the successfully copied 2gb card. 

When you say, "there is a bug with u-boot that requires the kernel and initrd to sit below the 2GB mark", if that would cause me a problem when I untarred the files from the 2gb card onto the 16gb card, how would I fix it?
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #70 on: February 24, 2010, 07:10:29 AM »

Strictly speaking it is not bug in u-boot, it is more of limitation.

U-boot is base on old version linux strip down to only support initialize hardware then load kernel from storage. In this case the ext2 file system code use unsigned integer to calculate where a file location relate to partition boundary so any file located with in first 4GB address space can be located by u-boot's ext2 code. This limitation have strange consequence for larger than 4GB partition. That is you may be lucky for a few times when you place your kernel in that partition which happen to land in the first 4GB address space, And next time when you replace the file because how ext2 code work, it may give it a new i-node which then calculated beyond first 4GB address than it appeared u-boot have bug that it sometime work and sometime it doesn't work.

So you can create any <4GB partition and place your kernel and initrd/initramfs in there as long as your u-boot code reference to right partition it will work.
Logged

Good Luck Smiley

oberger
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #71 on: March 13, 2010, 10:20:52 AM »

Hi.

What's the minimal size needed to perform an install on a SD card ?

I've tried with a 512 Mb one, with no luck.

Thanks in advance.
Logged

oberger
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #72 on: March 13, 2010, 10:40:01 AM »

Hi.

What's the minimal size needed to perform an install on a SD card ?

I've tried with a 512 Mb one, with no luck.

Responding to myself : it seems that an install on USB disk needs at least 566 Mb more or less (without swap) since that's what is used when I performed the first reboot... but I suspect it needs more to store packages and stuff that was removed at the end of the install.

So a 512 Mb card may not be enough :-(
Logged

ike
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #73 on: July 19, 2010, 04:16:25 AM »

I tried this method. It kept getting stuck telling me it could not find a partitionable device despite having a hard drive already attached to it and an SD card.

Do the USB hard disk or SD card have to be formatted with anything in particular?

At any rate. While searching for an answer, I came across the QT installer ESIA and that worked fine.
Logged

Pages: 1 ... 3 4 [5]
Print
Jump to: