MidnightReign.org

Incoherent Keyboard Bashing

Browsing Posts tagged linux

VirtualBox – Cloning Ubuntu (or Debian) based image issues

Comments off

In the interest of having this information somewhere handy:
Firstly, to successfully install VirtualBox Guest Additions within a server based image:

sudo apt-get install dkms build-essential linux-headers-uname -r

I discovered that if you clone an ubuntu server based image, networking stops functioning in the clone.
The reason for this is that the new Machine assigns a new MAC address to the NIC. So the Udev rules think it's a new card, and assign it a new device id, like eth1, or eth2, etc.

To prevent this from happening, in your base image, edit /lib/udev/rules.d/75-persistent-net-generator.rules

Search for 'xen', and you'll see a block about ignoring the Xen virtual interfaces. Add the following below it:

# ignore VirtualBox virtual interfaces ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"

Save it, and then remove the file /etc/udev/rules.d/70-persistent-net.rules.

Do the same thing in any cloned images with broken networking, and reboot the VMs.

Virtual Box – Resizing Disk Images

Comments off

NOTE: This is a technical article. While this is a fairly simple process, I'm not going to walk you through the basics of using a computer. Also – this is aimed at NTFS based images, but the basic principles should still work fine for other OS's.

Like a tool, and not thinking ahead, I created an XP Base dynamic image of max 10gb in size.  While this is usually enough space to mess around with things, I find it can be a pain in the backside when you want to install a sizeable program – say Visual Studio. While possible, you end up with very little disk space left over at the end of the day.

A possible solution to this dilemma would be to simply add a new disk to the machine, as needed. However, I like making things difficult for myself, so I rather wanted to resize the initial disk.  Unfortunately this is not possible with the provided VBoxManage utility. So, you need to jump through a few hoops, but it's really not that difficult.

You will need:

  • Clonezilla – http://clonezilla.org
  • GParted – http://sourceforge.net/projects/gparted/

Download the ISO versions – and for Clonezilla – DO NOT download the "Alternate" version, it will NOT work.

Using the Virtual Media Manager, create a new dynamic disk of your desired larger size. Call it whatever you like.
While you are there, add the CloneZilla and GParted iso's to the CD/DVD library.
Create a new VM, but do not attach any disks to it. Configure it as Linux, Debian. I called mine Clone Master.
Edit the VM settings, go to the Storage node, and add a new hard disk. Select your SOURCE disk (The disk  you want to enlarge). Add another hard disk, and select the DESTINATION disk (the big image you just created). Click the CD node, and select the clonezilla image. Boot the new VM.

The CloneZilla CD should now boot (If it doesn't, check the boot priority in your VM settings, and make sure CD is set to boot first).


Use the utility to do a local disk to disk clone. Using "beginner" mode is fine.  The "expert" mode has a setting to extend the partition to the size of the destination disk, but it didn't work for me at all – the cloned partition was the original size. Not sure if it's because of the NTFS partitions, or a bug in the version I was using. If it works for you then EXCELLENT – you won't need to do the GParted segment.
 

Once you have cloned the disk, power off the cloning VM, edit the settings, and detach the hard disks from it. Attach the newly cloned bigger image to your original VM, or create a new VM for it, and boot it. Check that the system works ok. If the partition hasn't grown to fill the new partition, you will need to continue to the next step.

Shut down the VM with the new large image.
Edit the settings of your cloning VM, set the CD to use the GParted iso, and attach the newly cloned image to the machine.
Boot the machine, and GParted should load. Just accept default settings, and eventually X-Windows will load with a copy of GParted. Click the extend button, and increase the partition to fill the disk. Apply the changes. It will only take a few seconds to completed. Exit the system, and shut down the VM. Edit the VM settings, and detach the disks (It's not strictly necessary – more of a safety measure).

Boot your previous VM to test the disk. All should be good.
 

Gamers for Linux

Comments off

If you run Linux and want to see more support for games, please do your part and sign this petition: http://www.gamersforlinux.com/

Driver design

Comments off

One of my 120gb drives failed, so I thought I would finally get around to reorganising my system to the way I want… Linux as primary, and Windows as secondary for gaming etc. It makes sense, since I’m getting ADSL in the next couple of days, and I won’t have the driver issues with my USB isdn adapter under Linux anymore. Now I can finally get rid of this shitty Microsoft platform as my every day OS.

So anyway, I reload, and I realise that I don’t have my LAN drivers handy, so I connect to the website to download them. I eventually find them, a 5mb or so download.

While it’s downloading (yeah yeah, slow ISDN), I’m browsing the site, and I discover this thing called ‘Download Center’. So I check it out. It apparently scans your system, and shows you what drivers you need to download. So I do that, just for the hell of it.

It basically says ‘LAN driver’ – Intel – size: 89Mb. I did a double take. What the fuck? 89Mb for a fucking LAN driver? You’ve got to be shitting me! Jesus, I need a LAN driver, not a frikkin’ operating system. Holy motherfuck, what the hell are these people thinking?!?

And then to add insult to injury, when I closed the window for that ‘Download Center’ software, Internet Explorer crashed. Luverly.

Have I mentioned that I fucking hate Windows?

Can’t wait until the frikkin’ LAN driver is loaded so I can get my faithful firefox running. Sheeee…

QSI Qrap

Comments off

I’m really annoyed.

My notebook (HP Compaq nx9000) is currently running Mandrake 10. While I’ve been happy with it, I thought I would give Debian a bash (excuse the pun), since it’s apparently one of those perpetually updated distros (and also one of the oldest), kinda like Gentoo, and I hate having to upgrade distros.

I burn the 2x ISO’s to DVDs, pop it into the notebook, and boot. It starts the installer, and eventually drops me into a menu.

“Right, what now?” I think to myself. I consult various forms of documentation, but all of them refer to menu options that just aren’t on this menu. Weird. Eventually, after a lot of swearing, I realise that it must be my DVD rom drive in the notebook.

To test this theory, I popped the DVD into my PC, and installed Debian. No mess, no fuss.

It’s weird how the drive my notebook reads the disc, but only in a half-assed kind of way.

–update

I finally found updated firmware for my QSI SBW-241 Combo drive here. It’s version VY02-3 (near the bottom). Be sure to grab the flasher executable too.

After upgrading the firmware, my notebook drive can finally read the DVD’s my PC has no problem with. Go figure.

  • A side note:

Although the installer gets alot further along than it did before, it’s still not 100%. Oh well. Guess I’ll figure out a network install or something. Piece of shit.

Linux Shminux

Comments off

I came across a weird problem.

I can copy a >2gb file from a smbfs mounted share to my local ext3 file system. No problems. Just try copy the sucker back. Dies at 2gb every time.

Hmm. Google finds mention of 2gb filesize limits, but based on old kernels (pre 2.4) and usually in ext2. So I try a search on smbfs instead. Voila. It’s apparently a known problem if you mount a smbfs filesystem. The workaround is to use smbclient’s ftp-like interface to transfer the files.

The con is that you can’t use normal cp or what-have-you (even tried rsync), but the pro is that it’s fast. Much faster than normal cp, and also no 2gb limit. Guess I will be using smbclient for the file copies in future.

Messy messy

Comments off

My desk at home is such a mess that I struggle to find my spare network cable that I use to plug my notebook in. Nooo, I don’t have wireless, and I’d hate to try move the 17Gb of data that I need to copy across a wireless link. It would take forever. 100Mbit takes a while as it is.

continue reading…

Powered by WordPress Web Design by SRS Solutions © 2010 MidnightReign.org Design by SRS Solutions

Bad Behavior has blocked 67 access attempts in the last 7 days.