bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 4:00 pm

I am missing something........

1) Do you expect distro manufactures to supply an image file or ISO?

2) If image file, how would the distro manufacturer expect this image file to be used with many different disk sizes?

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 4:07 pm

Bradburts said:


I am missing something........

1) Do you expect distro manufactures to supply an image file or ISO?

2) If image file, how would the distro manufacturer expect this image file to be used with many different disk sizes?



The images distributed by the foundation will be in the form of DD images that simply need to be flashed. Distro manufacturers are working with the foundation (or the documentation when/if some gets made I assume). The user is expected to buy a pre formatted sd card or deal with their own partitioning (or use PiCard). From the start there will be Debian, Fedora (Officially Supported) and Arch Linux.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 4:21 pm

Have you tried using DD with an unformatted/wrongly formatted card?

For example 1) DD an FAT, ext3 disk, 2) Format disk to FAT, 3) Restore orginal DD.

What happens?

Then question 2) of my previous post.

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 4:25 pm

Bradburts said:


Have you tried using DD with an unformatted/wrongly formatted card?

For example 1) DD an FAT, ext3 disk, 2) Format disk to FAT, 3) Restore orginal DD.

What happens?

Then question 2) of my previous post.



DD takes a copy of everything. Partition table included... Yeah I've been dding images all across my different memory cards (3 in total) - all seem to work fine. It's a block level transfer. Even if the memory card still has raw bytes on it somewhere. The partition table will know what parts it's partitions are valid for so it shouldn't be a problem

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 4:37 pm

Wanted to check that you knew that was is the case (its not obvious from your posts).

So your answer to my original question 2) is..............?

Or to put the question another way, short of writting a differencing tool and merging files, how would the distro manufacturer expect the end user to use the supplied image file on any sized disk?

And if the distro manufacturer does not resize the disk partition on first boot, would it not be simpier to offer them the scripts that does this?

Have you downloaded any Fedora, Debian etc image files? Where from? Do they automatically resize?

waagbo
Posts: 1
Joined: Fri Jan 06, 2012 4:50 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 5:04 pm

The answer to question 2 is.... they don't...

But they can require that you will use a card of a certain size (for example 2GB) by simply creating a 2GB image file. When you dd the data from the raw image you will simply have a 2GB partition written to your 8GB card.

I guess the partition can be automatically grown on first boot if they want. But this is depending entirely on the setup. It would surprise me if the Debian or Arch system did such a thing.

As I understand the main purpose of Raspberry Pi is to teach people to use the more advanced aspects of a computer, I really don't think this matter a lot. I should take anyone capable of buying a Raspberry Pi less than a few hours to learn the progress of creating new partitions, formatting and mounting them.

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 5:15 pm

Bradburts said:


Wanted to check that you knew that was is the case (its not obvious from your posts).

So your answer to my original question 2) is..............?

Or to put the question another way, short of writting a differencing tool and merging files, how would the distro manufacturer expect the end user to use the supplied image file on any sized disk?

And if the distro manufacturer does not resize the disk partition on first boot, would it not be simpier to offer them the scripts that does this?

Have you downloaded any Fedora, Debian etc image files? Where from? Do they automatically resize?



The distros provide an image to the foundations specs

Liz told me "Ideally, yes, you'd need to resize partitions, but Eben says that in
practice people can probably do it themselves. And yes, the images
just need to be DDed onto the card."

So from that, No they wont automatically resize.

My reasoning for coming up with this solution is that the images the foundation are providing do not resize themselves.. so this is one possible solution

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 5:30 pm

What I am struggling with is the view that the official Foundation distribution image will not resize itself.

I imagine that if this is so then its a resource constraint and a script could be written & offered.

I am also not getting the 'but' in the Liz/Eben quote, nor the original question which prompted the reply. There is no 'but' to the quotes.

I may be in a minority of one here but surely its better to write, test and request addition of a resizing script to be included in the official distro image release?

wgj000
Posts: 4
Joined: Mon Sep 12, 2011 7:32 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 5:31 pm

I don't know if this will help any or just muddy the waters. I have been using a Gumstix which is very similar to Rasberry Pi (aside from the price). This is how they set up their bootable SD cards:

http://www.gumstix.org/create-.....-card.html

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 5:38 pm

Bradburts said:


What I am struggling with is the view that the official Foundation distribution image will not resize itself.

I imagine that if this is so then its a resource constraint and a script could be written & offered.

I am also not getting the 'but' in the Liz/Eben quote, nor the original question which prompted the reply. There is no 'but' to the quotes.

I may be in a minority of one here but surely its better to write, test and request addition of a resizing script to be included in the official distro image release?



I may be incorrect here but as waagbo and Eben put it. People will probably be able to do it themselves so I doubt that it's important enough to them to start changing their official distro images. (Remembering here that people can buy SD cards from the foundation)

and @ Bill

Thanks for the input but that is a linux only method... we are looking for a multi-platform solution

wgj000
Posts: 4
Joined: Mon Sep 12, 2011 7:32 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 6:10 pm

Well let me tell you what I am worried about; maybe you can allay my fears. Your proposing using dd (or similar tool) to to write an image on to an SD card. And you propose to have 2, 4, 8, and 16 GB images to match the cards. And I suppose that the images will be ripped from 2, 4, 8, and 16 GB cards that you have. Now here is my worry. SD cards from different manufactures and even from the same manufacturer on different production runs have differing amounts of memory. So a 2GB SD card from Kingston does not have the same amount of memory as an 2GB SD card from SanDisk. So what happens if the 2GB image you ripped from your SD card is bigger than the 2GB SD card I'm trying to write your image to? Does it work?

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 6:19 pm

Bill said:


Well let me tell you what I am worried about; maybe you can allay my fears. Your proposing using dd (or similar tool) to to write an image on to an SD card. And you propose to have 2, 4, 8, and 16 GB images to match the cards. And I suppose that the images will be ripped from 2, 4, 8, and 16 GB cards that you have. Now here is my worry. SD cards from different manufactures and even from the same manufacturer on different production runs have differing amounts of memory. So a 2GB SD card from Kingston does not have the same amount of memory as an 2GB SD card from SanDisk. So what happens if the 2GB image you ripped from your SD card is bigger than the 2GB SD card I'm trying to write your image to? Does it work?



You bring up a very good point. I have already thought about this though (and also confirmed that it will work with Liz & Eben)... The images will be made by creating files with a specific amount of bytes and then mounting that file as a block device (i.e virtual disk). Then dd the original image to this and resize partitions. Repeat for all different sizes... I'm going to use an amount that is the equivelant of about 3.9 gig - rather than 4gb. and so on. So that this problem does not arise

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 6:22 pm

It isn't that hard to enlarge a partition.  I do it all the time when I buy a new HDD, image then enlarge.  There are all kinds of tools to do it.  If you are that worried about it image the smaller image to the card and then enlarge the partition.  If you have more than one partition on the volume then you image the partitions over one at a time and enlarge the ones you want to enlarge as you go.

There is a lot of hair splitting going on here.  Yes there will be some small variances with different SD card and USB stick makers, I'm positive the foundation will have this handled.  It shouldn't be that hard to underprovision by a couple hurndred KB just to be safe.

wgj000
Posts: 4
Joined: Mon Sep 12, 2011 7:32 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 6:35 pm

Liam Fraser said:

I'm going to use an amount that is the equivelant of about 3.9 gig - rather than 4gb. and so on. So that this problem does not arise

OK, good. Thanks for the quick reply btw.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 6:59 pm

A script to resize the disk would be doable in the timescales and would help those too scared by the manual.

The differencing idea is logistically challenged, are you going to update the difference files for each distro each time the distro changes?

You could automate but this is a really big hammer you're designing.......

Anyway those are my pennies

marc
Posts: 48
Joined: Fri Jan 06, 2012 6:40 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 6:59 pm

Hi all.

Had a quick scan over all the posts on here.
Just have one question to ask.

Does the pi have the ability to boot from usb drive/stick/hdd?

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 7:09 pm

Hi marc, the Pi has to boot from an SD card because it needs to load some firmware from there.

@Bradburts I was planning to distribute it all in a zip with original, and all the diffs (which are not very large). Yeah each time something is updated I'll have to redo them. After January though I have loads of free time so writing a back end to go with this would be fairly easy...

and I can't write a script capable of ram disks and stuff like that. I don't know Linux well enough.

If someone comes up with something better and this becomes unnecessary then that's fine. I've learned a hell of a lot of java on the way

For now I'm keeping with this and I want to see it through this time

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 7:15 pm

marc said:


Hi all.

Had a quick scan over all the posts on here.
Just have one question to ask.

Does the pi have the ability to boot from usb drive/stick/hdd?



*Facepalm*

Search.  You must at least have a bootloader on an SD card from there you can pass the boot process over to a USB stick or USB HDD.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 7:27 pm

Liam, you won't have any time after January................................

(or at least I hope that its no latter than January)

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 7:34 pm

Bradburts said:


Liam, you won't have any time after January................................

(or at least I hope that its no latter than January)


I don't think there is any real requirement for it to be finished by the end of January. It would be nice but not 100% necessary imo. I'll have to have a board it can be tested on anyway before I can release it anyway. I'll probably be uploading everything I have tomorrow and asking people in the thread to see if it works so far (i.e lists all their storage devices)... Would you be up for giving it a try?

marc
Posts: 48
Joined: Fri Jan 06, 2012 6:40 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 7:38 pm

ok thanks for the replies. Liam great work on the tutorials.

so you can use a bootloader stage 1 to 3 to load hal (firmware) from sd card then pass onto kernel on a usb stick?

So an sdcard could just be bios and a larger drive can be used for os on usb.

Just thinking that if you could use liveusb to install from usb to sdcard (inc firmware). And the usb should be seperate to sdcard once boot been passed over from sdcard and sdcard unmounted.

Hopefully it should partition and format sdcard on install from usb not needing to worry about size of sdcard.

the bootrom can be placed on sdcard on any size card that loads the liveusb from usb.

Hopefully the result is pi booting from sdcard formatted and installed using pi itself. no need for distro image size resizing etc. plus people would learn to install os as well.

would this work?

or would a livecd for pc be better?

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 7:44 pm

Hi Marc. I'm not sure if that would work. I dont know enough... If it did it would be a lot of work and I couldn't do it. A live cd is an option but I think a program is more convenient than a Livecd really. Glad you like the tutorials

Thanks,

Liam.

marc
Posts: 48
Joined: Fri Jan 06, 2012 6:40 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 8:02 pm

I use liveusb in most of what i do in IT. Recovery from viruses and data restoration.

I am very comfortable with using dd(disk duplication) software.

I think its a great program only used incorrectly can seriously damage a host computer hdd. when attemping to write to an sdcard. I had ubuntu running off an microsd card.

That was plugged into usb and not sdcard slot.

One of my concearns are that some people won"t want to mess with partitioning tools on their home pc as selecing the wrong device can damage it.

The idea is that the pi should be used to learn these skills as well as scripting coding etc.

Just a thought. Hoping to get my hands on one so I can start messing with boot arrangements without fear of destroying my developement pc.

marc
Posts: 48
Joined: Fri Jan 06, 2012 6:40 pm

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 8:16 pm

Had another thought.

Yeah my head hurts.

Persistant liveSd.

liamfraser280
Posts: 354
Joined: Tue Oct 04, 2011 6:53 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Jan 06, 2012 8:27 pm

marc said:


Had another thought.

Yeah my head hurts.

Persistant liveSd.



Mine is too!

I'll make sure I get the dd commands right in the code haha

So ladies and gents... a little update - The program can now list your devices on Unix, Windows and Mac... you'd be surprised how much code that takes



Who want's to test it?

Return to “Other projects”