Showing posts with label NOOBS. Show all posts
Showing posts with label NOOBS. Show all posts

Tuesday, November 19, 2013

Raspberry Pi Journal #37


Trying Out Operating System


So, I was trying out different operating system. The two I want to check are Arch Linux and Raspbmc. So, here is my impression of them:

Arch Linux


This distro has been touted as "light" OS because of the minimal packages installed on it. I can certainly vouch for its minimalism. There's hardly anything there! Supposedly it has an excellent package manager "pacman" that lets you install the most current, desirable packages. Sadly, it's a whole new OS, and packages. That means, I have to learn everything from scratch. I did check out the package list, and although there are some overlap with Raspbian, some of the packages are custom version specific to Arch Linux. In the end, I decided that if I want a slim OS, I'd sooner clean up Raspbian out of unnecessary packages, rather than starting a whole new OS from scratch.

Raspbmc




I have heard that this distro is painless and fun. So, with great anticipation, I installed it. It's a simple matter to run NOOBS on it, and overwrite the SD card with this system. After some booting, the picture ended up skewed on the monitor. Uh-oh. Bad sign. Turns out it's not a problem at all. After a couple reboots, the system went up. It's just as they said: painlessly simple. I went around the menus, and admiring the user interface. There's no TV show, though. Hmmmm. I went to the option menu and installed some Internet TV connection. There's no connection.

Well, duh, obviously I need to connect it to the Internet. I completely forgot about that. The problem is, there's absolutely to option to scan Internet connection! None whatsoever. In the end, I have to look up my SSID, and typed it in exactly. Lo and behold! It worked!

The distro then went into automatic OS upgrade cycle. Auto re-boot. And that's the last thing I saw from it. It went to blank screen from then on. Sigh.

Tuesday, October 1, 2013

Raspberry Pi Journal #30

NOOBS 1.3


Rob Bishop of Raspberry Pi foundation just announced recently asking for Beta Testers for the newly crafted NOOBS 1.3

I can see that a lot of work has been done to make it extremely user-friendly and accessible. A very interesting take about it, is the fact that you can easily have multiple OS flavor in one SD card. Therefore, you can have one all-encompassing SD card that is suitable for general, scratch, headless, servers, and so on. This is very big news! An educator can now use just one SD card for teaching different discipline. Very convenient, and thank you for providing this functionality.

I'm ambivalent about it, though. I guess I'm more of the old school tar-ball method. My idea of doing minimal headless server method would be to just install a standard distro, then ruthlessly purge the unnecessary packages. Of course, it'll be done automatically with a script.

Speaking of which, there is still no switch to use external USB hard drive. Considering that SD card do have the very real issue of wear, I think attaching a USB hard drive would be recommended so as to prolong the life of the system. I will see if I can do something about it.

Maybe some script that says: reboot with USB harddrive, and reboot with internal SD card. One button backup/restore would be handy, too. I probably will use rsync on that one.

I currently have a script that I run at the end of the day. I call it "EndOfDay.sh" that back ups my SD card to USB flashdrive, and updates my ToDo List. It's all very messy, so I will have to clean it up further.

Tuesday, August 27, 2013

Raspberry Pi Journal #12

Installing NOOBS

NOOBS is a one gigabyte download from raspberry.org. It contains several operating systems that you can install. I'm installing the default Raspbian here. Even though the process is straightforward, there's quite a bit of steps to go through. I've been taking pictures, and I'm sharing them with you so you can see what's going on.

Take care to set up your regions, and keyboard. The first time I installed, I didn't set the keyboard to US keyboard. Needless to say, what I type and what I see on screen are two different things!

You download NOOBS into a fresh SD card (running FAT32), a minimum of 4GB size. Then simply insert the card into Raspberry Pi and turn it on.

Wow, there sure is a lot of pictures here.


I'm installing the default Raspbian system. If this is your first time doing Pi, there's no reason not to do so. Raspbian is based on Debian OS, so it's a pretty solid choice.



Make some tea. It's going to take a while. The process is done automatically, but it takes time to write to the SD card. I didn't time it, but I'd say it's about 10-15 minutes.



Installation is complete. Now it's time to reboot!




Raspi config is started automatically



I enable boot to Desktop. The reason is that I'll have an easier time setting up things. However, there's some magic behind the scene. There's automatic password entry, so the system is less secure overall. Furthermore, all those graphic drawing on screen does make it slower overall.

I decided to trade speed and safety for ease-of-use and convenience. If you don't like it, you'll want to enable the short cut to stop the windowing system.



Set your Time zone!


Unless you're British, set your keyboard!







Ugh. The keyboard installation is pretty involved, doesn't it? I'm using wireless keyboard with USB dongle, so I'm treating it like any other USB keyboard. I'm setting it to just boring old keyboard. No fancy key mapping for me!



If you want to set up your Raspberry Pi to run headless, you want to set this up. Once you download all the necessary drivers and packages, then you want to re-run raspi-config and disable booting into GUI.




Advance options? Good stuff here!



Overscan setting, just in case you don't like black borders. Mine works perfectly out-of-box. Sometimes, though, I didn't turn on the monitor when the Pi boots, so I would be treated to different resolution and I see black bands.



Hostname for the network.


I set it to 256 MB. Half my main memory.


If you want to run headless, set it lower!


Done setting up? I think I forget something. In my installation, I went into the boot configuration file
  • hdmi_force_hotplug=1
  • hdmi_drive=2

If you missed it, you can go to /boot/config.txt to change it. This will force HDMI output, which is my TV.


Now reboot, and open up Leaf Pad, and type in all the punctuation marks and all to see if your keyboard is set up right. 

Well done! You have just installed an operating system from scratch!

My network connection works right off the bat. There's an icon Wifi Config where you need to put in your password. You know the network connection works because the time will automatically be set to local time. That's why it's important for you to set your locality.


Wednesday, August 14, 2013

Raspberry Pi Journal #6

Back Up Your SD Card part 2

On the last journal entry, I mentioned how everybody is satisfied with turning off their Raspi and pulling the card out, only to insert it to a Windows computer just to back up their SD card. Well, I'm not going to settle for that.

So, I keep digging, and finally found the program "part image". It's a partition backup program that takes a partition and save it to a file. Sounds familiar? Yes, that's exactly what "DD" Disk Dump do!

I ran into another problem. What's the name of the OS partition? Not documented anywhere, is it? After a few trial and error with fdisk, I came up with the name /dev/mmcblk0

There are 4 different partition, mmcblk0p1, mmcblk0p2, mmcblk0p3, mmcblk0p4. I'm sure one of those thing is the swap partition.

I'm backing up the first partition to my flash drive. mmcblk0p1 is fat32, 1.04 GB. Well, I think I just backed up NOOBS bootloader partition. Oh, well. It only takes about 20 minutes, anyway. Nice interface, too.

sudo -z1 -o -d save /dev/mmcblk0p1 /mnt/Lexar/raspi-p1.partimg.gz

So, that's it! Maneuver through the GUI and make some coffee!

Be careful about some of the options. There is a sync option at the end, that you want to keep, especially if you're doing live back-up. Mount devices are also iffy, and although you can override it, you definitely want to be extra careful on this one. I almost made the mistake of copying and writing to the same device, which would be bad.

I tried to do more back up:

The file system of [/dev/mmcblk02p2] is [-unknown-], and is not supported

As is partition 3 and 4.

So, the question is: Am I fully backed up or just the NOOBS?

I did

sudo dd if=/dev/mmcblk0p2 of=/media/Lexar/raspi-2.img

2+0 records in
2+0 records out
1024 bytes (1.0 kB) copied, 0.0992122 s, 10.3 kB/s

Well, obviously, my /home directory isn't in there. Let's do partition 3:

No such file or directory

Huh? It turns out they got shifted to 5 and 6. Oh, well. This is bad. I wonder if I'm destroying the file system! Better stop here for now.

In the end, I bit the bullet, and dump those anyway. Partition 5 is about 60 MB, so I'm guessing that's the swap partition. Partition 6 took such a long time, that I simply didn't wait.

sudo dd if=/dev/mmcblk0p6 | gzip -c >/media/Lexar/raspi-6.img.gz

It does about 2 MB per minute, and so I decided not to wait. Next time, I'll do it without compression, and if desired, do the compression separately. Also, I'll probably do it in the background so I can check the copying status

$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

Straight from the man page!

So, I finally did it, and what happens? Ran out of space! How can that be? And before you ask, nope, it doesn't work. Does not even boot.