jraff1
Posts: 11
Joined: Wed Dec 21, 2011 11:58 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 12:53 am

There needs to be a step by step install from power the device on to completely running OS.
Step 1:
Step 2
Etc.
Step N: log on as ROOT (root) and test the R-PI.

I don\'t see a complete A to Z procedure for getting an OS running.
Lots of talk and discussion about different parts, but for the UN-initiated (me) nothing complete and reliable.

Is there a straight Debian install and run procedure?

Would a USB Ram stick be better as a HardDrive replacement rather than a SD card?
Or would it be too slow?

Sorry for so many questions in one submission.

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 2:57 am

[quote]Quote from jraff1 on December 22, 2011, 00:53
There needs to be a step by step install from power the device on to completely running OS.[/quote]

Bit tough since none of that is finalized yet. And hardware is higher priority until the hardware is finalized.

It will be something like:

1- download R-Pi OS from RaspberryPi.org
2- put SD card into PC SD reader
3- copy files (or run installer) to put OS onto SD card
4- safe remove SD card from PC
5- put SD card into R-Pi
6- apply power to R-Pi
7- wait for login prompt on R-Pi
8- login to R-Pi

Steps 1-4 can be avoided by purchasing an already installed SD card from RaspberryPi.org .

[quote]Would a USB Ram stick be better as a HardDrive replacement rather than a SD card?
Or would it be too slow?
[/quote]

SD flash cards and USB flash drives both come in many speeds, some fast, some slow, and everything in between.

The R-Pi must have an SD card to start the boot process. After that you can have normal operation continue from the SD or from a USB flash drive or USB hard disk.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 3:11 am

I am moving this thread because the intent of this section is for already working distros, and this clearly has nothing to do with that. These are clearly valid questions which Sylvan has addressed.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 10:31 am

Will there also be instructions on \'installing\' a distro from scratch? I\'m planning on starting with a minimal debian install on mine and then just using openbox rather than LXDE. If there is no easy way then I guess one way would be to get a list of debian minimal packages and purge the packages from the pi that are not on there. Just leaving Xorg on and the necessary stuff to keep the hardware going :)

kme
Posts: 448
Joined: Sun Sep 04, 2011 9:37 am

Re: Working Linux OS instructions

Thu Dec 22, 2011 10:57 am

[quote]Quote from liamfraser280 on December 22, 2011, 10:31
Will there also be instructions on \'installing\' a distro from scratch? I\'m planning on starting with a minimal debian install on mine and then just using openbox rather than LXDE. [/quote]No matter if you choose Debian, Fedora or Arch they all come with a package manager (apt-get, yum, pacman respectively) so you can customize at will and all have broad communities for help.

Swapping OpenBox for LXDE is next to trivial:
apt-get remove --purge lxde
apt-get install openbox
No further configuration needed.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 1:37 pm

Thanks mate, yeah it seems quite simple. I\'ll also do a

Code: Select all

dpkg -l
to see if there are any packages that I think are unnecessary, especially if they are started during sytem boot. I\'m looking forward to the challenge of using the pi with it\'s limited resources. I plan to use one of mine for IM, basic browsing, email, downloads that I can SSH/VNC/NX into from anywhere.

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 5:15 pm

[quote]Quote from liamfraser280 on December 22, 2011, 13:37
Thanks mate, yeah it seems quite simple. I\'ll also do a

Code: Select all

dpkg -l
to see if there are any packages that I think are unnecessary, especially if they are started during sytem boot.[/quote]

yeah, I\'ve done that before. \'deborphan\' comes in really handy. Also I like to use \'wajig\' (which wraps a bunch of the dpkg and apt tools into one) most of the time rather than all the individual tools.

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 5:21 pm

[quote]Quote from liamfraser280 on December 22, 2011, 10:31
Will there also be instructions on \'installing\' a distro from scratch?[/quote]

I suspect not. Every platform needs a custom way to start the installer and a custom way to install the boot loader (if needed) and kernel. Most of the time the oddball platforms just build a basic image and supply that with a kernel (and initrd if needed) rather than creating the custom installer.

However if you want instructions for something like that, see the \"emdebian\" project. I\'ve used it for a few different cores, and they are all pretty similar.

I suppose if I had my preference for the R-Pi, you would be able to choose a bare minimal image to download and install (with no GUI at all), or a more fully featured image (with what the foundation considers to be the standard desktop and apps, and etc).

We\'ll just have to wait and see what the foundation and/or earliest users come up with.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 5:39 pm

I\'d be quite happy to upload what I consider a minimal image once I have my Pi :). I wonder how they will distribute the images. If DD is used doesn\'t that copy at a disk level rather than file level. So if we have a 4gb card then we get a 4gb image? Unless it zips down nicely I suppose. There will probably be tutorials on resizing partitions and stuff like that I think.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 5:43 pm

P.S Deborphan looks handy! Thanks.

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 7:23 pm

[quote]Quote from liamfraser280 on December 22, 2011, 17:39I wonder how they will distribute the images. If DD is used doesn\'t that copy at a disk level rather than file level. So if we have a 4gb card then we get a 4gb image? Unless it zips down nicely I suppose. There will probably be tutorials on resizing partitions and stuff like that I think.[/quote]

Probably so.

(And a 4gb image would zip down to just the needed data as long as empty space was wiped before compressing. However ext4 resizing is trivial, so the image should not be significantly larger than needed to contain the necessary files. If we never \'dd\' over the partition table, size of the SD card does not matter as long as it is big enough.)

I think the most simple package format for an image would be a zip with a few files to drop into the first partition (FAT) and a minimum size ext4 image to dd into partition 2 for the root filesystem. That root image could be set to automatically on boot resize the filesystem to the size of the partition (resizing is part of the kernel driver for ext4). Windows XP and later can open and read from a zip file without any additional software, but do not come with \'dd\' so probably a \'dd.exe\' or some other installer would need to be available to put the root image into partition 2.

Perhaps at first, or as a minor upgrade to the package format it would be easy to include a script for linux (or OSX) that would automate this process. That might also be helpful for existing R-Pi owners to upgrade or prepare SD cards for others, but we would need to be careful not to mess up their existing SD card.

The 2nd generation package format could be a self-extracting zip file (or any similar archive so long as it can be manually extracted using common Linux and OSX tools). When run on Windows it would extract and run an installer from the archive. That installer would have the capability to partition the SD card, format the FAT filesystem in partition 1, copy the files, and dd the root image to partition 2.

The 3rd generation could be a .dmg for Mac OSX to make Mac-based install as easy as Windows.

Caveat: If the GPU has restrictions on the FAT filesystem format, the archive might need to contain an image of the FAT partition instead of files. That would work fine, but might be a bit more awkward as resizing FAT requires additional tools. Maybe we never need to resize the FAT (just say right now it needs to be XXMB and provide an image for that size).

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 8:08 pm

I would imagine the FAT is practically read only. If the gpu is literally loading up some firmware or whatever it\'s doing, then the only possible thing it would need to write would be error logs. I think they\'ll probably just provide an image for the FAT, thats if my assumption that the partition wont be written to is correct. If the Linux bootloader and stuff are on a seperate ext3 or ext4 partition then the FAT partition wouldn\'t even need to be mounted.

The .dmg and self extracting zip files are really great ideas and it would be pretty easy to write an installer as alls it would really be is a front end to command line software or API\'s. Then at least people won\'t have to get messy with the terminal untill they get into Linux, where undoubtedly one day they\'ll have to venture into the terminal :)

obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 9:12 pm

the foundation was looking for someone to hack up a multiplatform SD creation script+UI a couple of weeks ago. The thread degenerated into fruitless haggling and politicking, I don\'t think any actual work got done. Maybe they could use you mad skillz ^^

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 9:20 pm

I\'m not a professional programmer in any way but I\'d be up for giving it a go. At least getting the ground work in and let a more experienced person tidy it up? Where are the specs on how it will work? An example SD card image exactly how it will be on release day would be helpful if someone had that?


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

Re: Working Linux OS instructions

Thu Dec 22, 2011 10:04 pm

[quote]Quote from liamfraser280 on December 22, 2011, 21:20
I\'m not a professional programmer in any way [/quote]

You sound like you know what you\'re doing, and I don\'t think that pay is involved :)

Seriously, if you need some support in reviewing or testing changes then I would be happy to help.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 10:09 pm

Just made a post there to see if I can resurrect it :) Hopefully so!

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 11:07 pm

Forgot to add email notice.

Checked the code and it seems well written & easy enough to change.
Changes as requested whilst still using ISO file format change should be straight forwards.....

EDIT: I am thinking expand the ZIP to a RAM image and use mkisofs to create the ISO to run through the existing software?
Sylvan\'s approach would definitely be lots quicker.
He\'s probably done it already ;)

Haven\'t properly researched the file formats yet, that\'s where I would get unstuck, hence I would try and reuse what is there.

Anyway whoever is driving let me know what you need.
I would really like lean & mean images. IDK how the RAM works out but if I can go with the A model then that would be the best solution. Don\'t want a desktop for most of what I plan, so I will have that extra RAM if I can!

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 11:18 pm

I think the main problem with whatever solution we come up with, is getting the ext3 or ext4 partition resized in windows/mac. See my last two posts at http://www.raspberrypi.org/forum?mingle ... pic&t=1190

I think we need to get a team together working on this as we now have pictures of the (fingers crossed) final test boards.

If you look in the tools section of the source there is a DD.exe so I assume that\'s the back end to writing images to the SD card although I\'ve only had a very breif look.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 11:40 pm

I will do as I am told until the team arives :)

I am guessing that the software creates the partitions according to the size of the USB stick inserted minus FAT, minus the data partition.
So assuming that its all variables then we should be able to tap into that and create the SD partition with the minimum size that we need from the expanded ZIP plus a little.
It looks like solid code, I am going to trust the author :)
Anyway bed calls. I will go rumaging in the morning if you don\'t find it b4.

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

Re: Working Linux OS instructions

Thu Dec 22, 2011 11:42 pm

I\'ll download the source and have a look through it to see what I can find :)

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 11:53 pm

Forget .iso. There is no need and no use for an iso image.

There is no need to resize partitions from Windows (or Mac). Simply create the FAT partition the correct size to hold the image and create the ext4 partition as the rest of the space.

Resize filesystem to fit its partition is built into the ext4 kernel driver.

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 11:57 pm

BTW, unless the GPU has restrictions on the FAT it will support, it will be much easier to not do a FAT image. There will only be a handful of files (maybe just 3) that need to be installed into the FAT partition. It would be easier not to have to put them into an image and not significantly harder if at all to copy files to a FAT partition.

The ext4 partition is different because Windows and OSX cannot easily create an ext4 filesystem nor can they copy files to it. It has to be a filesystem image.

obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: Working Linux OS instructions

Thu Dec 22, 2011 11:58 pm

can you create an ext4 partition from windows ? or access it ?

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

Re: Working Linux OS instructions

Fri Dec 23, 2011 12:01 am

I don\'t think I know enough about partitioning or filesystems to make such a tool. I still think a tool from scratch might be less work and better in the long run.

I don\'t know about making a partition on windows. I think the idea is to create a partition table marked with ext4 and then write the RAW data from the image to that location. Then resize somehow when Linux boots. Don\'t know how resizing would happen automatically though.

Return to “General discussion”