NetBSD – Del 1

NetBSD-smaller

Nu tycker jag att jag är tillräckligt bekväm med Linux för att våga mig på BSD tänkte jag härom dagen. BSD är ju liksom hardcore, Unix på riktigt, och det är väl nyttigt att ha lite kunskap i det med. NetBSD har sitt fokus på att finnas på många plattformar, och det passar mig utmärkt. Brödrost likväl som uråldriga Amigadatorer, NetBSD finns i aktuella versioner till det mesta.

Jag får erkänna att jag hittintills inte kommit längre än till att ha det installerat på min redan dubbelbootande Win7, Linux stationära maskin. Jag följde i stort tipsen här http://abhinav-upadhyay.blogspot.com/2011/05/making-netbsd-dual-boot-with-linux.html

men stötte även på några saker som kan vara bra att veta för den som ska testa NetBSD:

*Jag använde NetBSD 6.

*Linux stödjer häpnandsväckande nog inte BSD filsystemen UFS/2 i skrivläge. Se här

*NetBSD fick lite frispel när jag kopplade ur och kopplade i några andra hårddiskar – antar att det i NetBSD uppstart någonstans sparas disk-idn – och då inte GUIDs – vilket känns sådär – är NetBSD bundet till att man har samma antal hårddiskar (oberoende) som när man installerade känns det skumt. Måste ha varit något annat.

* GRUB hittade fint min Windows och min linux-partiton, men jag fick lägga dit en egen rad i /etc/grub.d/40_custom för att den skulle hitta NetBSD

menuentry "NetBSD 6x" {
set root(hd4,2)
chainloader +1
};

Tänk på att grub är lite inkonsekvent:
”Note the new partition naming convention.
Devices start counting from ”0” as done previously.
sda is designated as ”hd0”, sdb is ”hd1”, etc.
However the first partition is now designated as sda1.
Counting partitions does not start with ”0”. sda5 is 5″

Glöm inte köra update-grub2 efter menyändringen.

* NetBSD ville inte boot från install CD-Rom:en när den var satt som SATA-enhet i BIOS , sätt den som IDE (om du har ändrat dess inställningar i BIOS)

* Glöm inte att donera en slant till NetBSD, de behöver all hjälp de kan få.

Återkommer med mera erfarenheter, just nu har jag i princip bara verifierat att jag kan logga in.:)

Annonser

1Z0-895 ( Java EE 6 EJB Developer Certified Expert Exam )

I just passed the  the EJB SCBCD/OCPJBCD  exam with 86%. I’m happy with that!
Tools for passing the exam were:
* Mannings EJB in action Book
* O’Reillys EJB 3.1 Book
* Parts of JEE6 tutorial
* Enthuwares testexams. Recommended
*The notes found in the link section for certifications on coderanch , thanks Ivan and Fritz, Very good!!
* and… some coding and testing and coding and testing and… yes, you get it.

I worked a bit with EJB before, and will continue to do so. Next book for me is Adam Biens Enterprise patterns, but first… a well deserved rest

Cloning a dual boot Windows/Linux hdd to a smaller SSD hdd

I have an HP-8560 laptop at work, happily running Ubuntu 12.10 and Windows 7 x64. The other day, my boss told i could have an 256gb SSD-disk to replace my 512gb ”regular” one. Nice, i thought, as that will save me from bootstress and other stuff. An SSD is faster, better and shinier and newer and lighter and… Well!

I didn’t feel like setting up everything in my environment(s) again, and so, like i done before, i wanted to clone the old disk to the SSD-disk. Usually, and in all occassions i use 2 Open source tools to do this kind of stuff:

GParted (or Parted magic, where GParted is included)
and
Clonezilla

GParted is a tool for changing partitions, and Clonezilla is a clone/backup tool for harddrives (think Norton Ghost).

Unfortunately following this guide didn’t work for me, as i also had to do the following:
* Adjusting the partitions with gparted worked fine – but remember to run chkdisk in Windows and fsck in Linux after your done.

* I couldn’t get Clonezilla to clone my old drive even after i shrunk my partitions, so i had to restore to Acronis true image,( an commercial variant of Clonezilla ). That worked fine for the Windows partition, but as for Linux i had to do an reinstall. Fortunately it went quick as i could copy my /home folder to the new Linuxinstall.
* I also had to have an Windows 7 dvd do an repairrun after the Acronis cloning.

Took me some extra hours, as i thought i would be really easy, but now it works fine. If it was worth it. Hell yeah, go SSD!!!

Clone/backup your memorycard to file

I needed to clone/backup an 32GB SD-card i use for one of my retrocomputers (An Amiga running with the SD-card as an harddrive).

Basically i just wanted a file of it that i could either write to new SD-cards, or easily backup for later restore.

Problem solved, this is how i did:

* Connect the SD-card with your adapter
* Fire up an terminalwindow (yes, we will do this commandline style, scary huh:)

* And we will use the old, old (but reliable ) dd command. dd takes an bit for bit sector of a device and writes it to file etc. So,

dd if=/dev/sdX of=YOURIMAGE.img

where sdX is the device you want to make an clone of.(Find out with disktools, gparted or so on) and YOURIMAGE.img the file you want to write to.

For writing the imagefile back to another device

dd if=YOURIMAGE.img of=/dev/sdX

 

Good to know:

* CAUTION: Be sure that /dev/sdX is the right device, other wise you can f**k things up. Doublecheck!
* Use same sizecard you write back to. Otherwise, you may waste space.
* Don’t forget to backup your file..

Tools used:
* Noname sd-card adapter to USB (plexgear)
* Mustang 32gb SD-card
* (and in the old amiga an SD/CF-drive from Delock)