Archive for Linux

Oops, I updated Windows and overwrote the MBR

I just updated to Windows 7 on my dual-boot laptop, and of course, Windows is greedy, and with its brain-dead installation process it just assumes I would like to overwrite the MBR. Here’s how I got GRUB working again:

I downloaded the latest ArchLinux Live distro from http://arch-live.isawsome.net/iso/ which at the time of writing was “20080731″. Burned the ISO to a disk and booted the computer from it. I chose the console only boot option, no need for a full desktop session as this is a quick fix.

The steps to locate the correct GRUB info and rewrite the MBR, directly from the ArchLinux wiki pages at http://wiki.archlinux.org/index.php/Grub. Just be mindful, like always, that if you do this wrong you may make matters worse, so do your reading first! If you screw up your computer, it’s your own fault.

If you are unaware of the the location of /boot, use the GRUB shell find command to locate the GRUB files. Enter the GRUB shell by:

# grub

The following example is for systems without a separate /boot partition, wherein /boot is merely a directory under /:

grub> find /boot/grub/stage1

The following example is for systems with a separate /boot partition:

grub> find /grub/stage1

GRUB will find the file, and output the location of the stage1 file. For example:

(hd0,0)

This value should be entered on the root line in your configuration file.

Use the root command with the output from the find command to instruct GRUB which partition contains stage1 (and therefore, /boot):

grub> root (hd0,0)

The following example installs GRUB to the MBR of the first drive:

grub> setup (hd0)

Then just reboot, pop the live CD out, and you have control of your computer again!

Leave a Comment

Cannot Connect to Hidden Wireless Network

I don’t know if this is Arch Linux specific or not. After a recent kernel upgrade, 2.6.28, I was not able to connect to hidden wireless networks. This could either be fixed by unhiding the SSID, or by the steps below.

Install the “crda” package:
# pacman -S crda

Uncomment your region in the “wireless-regdom” file:
# vi /etc/conf.d/wireless-regdom

Add “wireless-regdom” to the daemons line of rc.conf:
# vi /etc/rc.conf

DAEMONS=(syslog-ng hal dhcdbd !network wireless-regdom networkmanager rpcbind nfs-common @alsa @openntpd @netfs @crond gdm)

Leave a Comment

Arch Linux Package Mirror

I finally get a chance to give something back to the Linux community that has been so good to me over the past few years.

I started a package mirror for Arch Linux, sure there are plenty of other ones to chose from. But this is a way I can at least do a little something to give back. Plus, there is one more thing that will hopefully help people out from time to time. I am going to try to never delete any old packages. That way if you ever need to roll back a package but don’t have it locally, there will be a good chance you will be able to find it here.

Just add the following to your /etc/pacman.d/mirrorlist

for i686:
Server = http://www.schlunix.org/archlinux/$repo/os/i686

or if using x86_64:
Server = http://www.schlunix.org/archlinux/$repo/os/x86_64

Some older i686 packages are still located at http://schlunix.org/arch-linux/i686

Leave a Comment