hippy
Posts: 6287
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 3:21 pm

Liam Fraser said:


It's all about getting the windows users easily into the Linux environment... before they have been turned!


Most Windows users with minimal or no Linux experience will probably accept they have the choice of buying their R-Pi with a ready-to-go bootable SD card or going the DIY route which translates into hoop jumping.

That changes the perspective of what's needed for Windows users, what they have to do if they trash the bootable card rather than first ever use. Having a means for the R-Pi itself to clone the bootable card to another as a backup would suit the majority I expect, again, a choice of buying a backup card or hoop jumping later.

A single Windows application with no prerequisites and a one-click 'Make card bootable for an R-Pi" button would be ideal but is not a necessity.

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 3:39 pm

Agreed, they can buy the SD card and spares if they think ahead.

The scenario has been to recover trashed SD cards, maybe provide a simple way for people to try other distibutions.

You could imagine a teacher being grateful as well.

The imager is ideal as it provides a backup vehicle - just the wikis to be written once the process can be confirmed.

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 3:39 pm

Agreed, they can buy the SD card and spares if they think ahead.

The scenario has been to recover trashed SD cards, maybe provide a simple way for people to try other distibutions.

You could imagine a teacher being grateful as well.

The imager is ideal as it provides a backup vehicle - just the wikis to be written once the process can be confirmed.

hippy
Posts: 6287
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 3:48 pm

Bradburts said:

maybe provide a simple way for people to try other distibutions.

That's a good point. If the R-Pi itself can create a bootable SD card for that other distro then you can perhaps focus on achieving that rather than the more difficult job of doing it under Windows.

I'd actually prefer a Windows application so I'm happy if you want to go that way. I'm really just saying I'd understand ( and think other Windows addicts would ) if you didn't go this route.

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:00 pm

hippy said:


Bradburts said:


maybe provide a simple way for people to try other distibutions.


That's a good point. If the R-Pi itself can create a bootable SD card for that other distro then you can perhaps focus on achieving that rather than the more difficult job of doing it under Windows.

I'd actually prefer a Windows application so I'm happy if you want to go that way. I'm really just saying I'd understand ( and think other Windows addicts would ) if you didn't go this route.



Will that be possible. How would the Raspberry Pi create other SD cards if it's root file system is on SD cards (without a card reader)? Ramdisks or something like that?

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:05 pm

Thanks.

I also think that the Windows single click route is preferable as that's where most of the new users will be comming from.

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:07 pm

Liam, we need to RTFM

Ramdisk no.

USB SD reader yes.

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:18 pm

Bradburts said:


Liam, we need to RTFM

Ramdisk no.

USB SD reader yes.



What manual ... the wiki we are in ?

I'm looking into some new plans... I don't think VirtualBox is going to work out that great. Initially I'm going to rewrite what I've done so far in Java... which will take a fairly short amount of time because all of the libaries are there. Plus my dad is a professional dev who knows Java so can help me out . Worst case scenario is that it only works on Linux in the beginning, just the same as the Python version. Best case scenario is that a native solution will be sorted for Windows and Mac people. I know some people think Java is bloated but it's not actually that  bad and it's not going to be something your constantly running so who cares.

Thoughts?

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:32 pm

I did say....

Anyway, long may Option 1 die!

Don't forget to test.

And when you have finished testing, don't forget to test.

PS

We are all bloated at this time of year. Just as long as it runs in 128MB.



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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:38 pm

Yeah I will. I'll have to disable it from starting on Mac untill I can test it on there.

I'm thinking, depending on how the cards are done. That making an SD Image factory for the backend... that makes all different card sizes when you feed it one image... then it would be fully native because it would literally be a DD and you'd download whatever image was for your card size. I'd need to go a bit lower than full capacity because different SD cards are slightly different sizes... but in general that could work.

Learned a lot of python which will be great for my video tutorials anyway soo it's all good

HansH
Posts: 214
Joined: Mon Sep 05, 2011 7:49 am

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:50 pm

Bradburts said:


Another great find.

IMG is experimental so some testing seems in order.

The built in Virtualisation looks great. No reboots. That would tend to trump the VB & Live USB options.

Yet another process which should be easier than the wiki!

Excellent.

My money is still on the imager though.


Well if have rewritten the Win32DiskImager into a console version and the win32 exe is now only 9kb ...

C:\Develop\img2usb\Release>img2usb netbook-arm.img I:
Writing image netbook-arm.img (5266248):
[==================================================] 100% (5266432)
Finished writing in 242 sec.

If there is interest in it,  I can make it available with the source and the vc project files.

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 4:54 pm

HansH said:


Bradburts said:


Another great find.

IMG is experimental so some testing seems in order.

The built in Virtualisation looks great. No reboots. That would tend to trump the VB & Live USB options.

Yet another process which should be easier than the wiki!

Excellent.

My money is still on the imager though.


Well if have rewritten the Win32DiskImager into a console version and the win32 exe is now only 9kb ...

C:\Develop\img2usb\Release>img2usb netbook-arm.img I:
Writing image netbook-arm.img (5266248):
[==================================================] 100% (5266432)
Finished writing in 242 sec.

If there is interest in it,  I can make it available with the source and the vc project files.



That would be fantastic ! Is it written in C?

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 5:02 pm

Out of interest, what do we gain?

HansH
Posts: 214
Joined: Mon Sep 05, 2011 7:49 am

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 5:32 pm


Liam Fraser said:

HansH said:



Well if have rewritten the Win32DiskImager into a console version and the win32 exe is now only 9kb ...

C:\Develop\img2usb\Release>img2usb netbook-arm.img I:
Writing image netbook-arm.img (5266248):
[==================================================] 100% (5266432)
Finished writing in 242 sec.

If there is interest in it,  I can make it available with the source and the vc project files.



That would be fantastic  ! Is it written in C?



Yes, it is in C, no classes or cpp stuff is used.

you can download it at : http://www.atbas.org/files/index.php

Bradburts said:




Out of interest, what do we gain?




Well it isn't a GUI and does not depends on a lot of 'required' dll's

and it is easier to adapt and easier to integrate in a larger tool/GUI.....

or you can use it as a library...

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 6:06 pm

Thanks.

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 7:09 pm

Any Java developers want to reccomend a good IDE?

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5202
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 7:34 pm

Eclipse!
Director of Communications, Raspberry Pi

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 7:39 pm

That's what I'm playing with. Can't really decide between Swing or SWT though. Any advice on that?

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

Re: PiCard - GUI SD Preparation Tool

Fri Dec 30, 2011 7:51 pm

Nevermind... SWT doesn't work well on arm! Swing it is

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

Re: PiCard - GUI SD Preparation Tool

Sat Dec 31, 2011 1:23 am

So Ladies and Gents... I've started to port it across to Java using Eclipse as my IDE with Window Builder Pro as my Swing designer. At the moment I'm using the layout based on specific co ordinates but I have a feeling it should be less specific to work well across all operating systems. What layout would the Java devs suggest?

Anyway this is what it looks like so far...



P.S Does anyone know how to get rid of the border around 'Prepare my SD card' on the JButton? It moves to a different button once you click it.

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4183
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: PiCard - GUI SD Preparation Tool

Sat Dec 31, 2011 4:20 am

I was just mulling over the sd card creation thing and decided that we actually have so many variables in existing available hardware and software that we have no chance in building a single solution for all situations.

The one situation that we can handle is where the raspberrypi is being used in a classroom/club situation and someone has trashed their sd card as we can be pretty certain that there is at least one working raspberry pi available to run the build script unless we are really really unlucky.

I knocked up a quick bash/dialog script to do this. it is very mickey mouse and needs to have a "download raw disk image and download rootfs+kernelblob tarballs" ability added to it and some prettying up but the general idea works

http://pastebin.com/QUY02xum

[yes i know the script is rubbish so you don't need to tell me that it sucks i already know . but after a couple of quick non-destructive tests it seems to work]

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

Re: PiCard - GUI SD Preparation Tool

Sat Dec 31, 2011 9:58 am

That's great ukscone!

Teachers recovering classroom Pis is exactly the sort of scenario which needs to be covered.

It looks like this project may become more like a collection of SD card utilities.

Which is fine, so long as the scenarios get covered!

PS

Your script looks great and is very easy to follow.

I was tempted to re-ignite the 'is bash evil' debate but given the effort & cause will pass

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

Re: PiCard - GUI SD Preparation Tool

Sat Dec 31, 2011 10:06 am

So... here is what info I have from Liz and Eben (thanks very much to them for helping me out):


The official SD cards contain, a partition table, fat32, and then the ext3 partition (containing either a swap and rootFS image that are mounted as loopback devices), or a swap partition if the ext3 partition contains files rather than an image


These images literally have to be DDed onto an SD card and then the partitions need to be resized to take up the rest of the free space.... for all you Linux users thats a simple DD and then a GParted


Going to have to put less hours in because of college work and exams coming up... but lets face it there isn't that much of a rush. Most of the windows people will probably be getting SD cards from the R-Pi store. I'd rather have a good tool that's been tested than have a lot of angry emails from people who's hard drive I've just DD'd away ! The way I plan to do it is to have either:


Different images for each card size... "Eben says that I should remind you that not all 2GB cards are created
equal, so an image for 1.9GB, 3.9GB, 7.9GB etc etc would be a good
idea!"
Make different size images for each card and then perform some kind of diff utility, so I have to patch the changes to the partition table and thats about it (much more efficient). All's this needs to work is a native DD tool which we have on all target platforms. Eventually this work will be done by a back end but realistically, anyone desperately needing this tool will only be installing the default distro (Fedora)

So if I understand what I've recieved from Liz and Eben correctly... there is no need for formatting .... which makes your script a lot easier ukscone. It's a great idea by the way... especially for use from the Pi with an extra card reader!

Best wishes for the new year all,

Liam.

Warringer
Posts: 56
Joined: Tue Aug 23, 2011 5:04 pm

Re: PiCard - GUI SD Preparation Tool

Sun Jan 01, 2012 2:20 pm

Bradburts said:


That's great ukscone!

Teachers recovering classroom Pis is exactly the sort of scenario which needs to be covered.


Not that much need for recovering classroom PIs, when you can have a couple of spare SDs for the kids and you are able to just put a stored image on the SD in need of 'recovery'.


It looks like this project may become more like a collection of SD card utilities.

Which is fine, so long as the scenarios get covered!


SD utilities are always a good idea.


PS

Your script looks great and is very easy to follow.

I was tempted to re-ignite the 'is bash evil' debate but given the effort & cause will pass


Bash is useful when you have to bash out a quick automation script.

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

Re: PiCard - GUI SD Preparation Tool

Sun Jan 01, 2012 5:25 pm

Hey Guys.

A little update on the Java version of the tool... I'm getting along really well with Java and Eclipse which is good. Approaching the tool slightly differently this time and have come up with a main screen like this:



I'll start putting the code on GitHub once I have started the main chunk of the app (i.e not UI). Would any of the Java devs like to reccomend a way to have string tables. I think it would be really nice if the app could be translated !

Return to “Other projects”