I have mentioned the flashrom utility in my blog in the past. This is a small command line tool which allows you to update your BIOS/coreboot/firmware chips without opening the computer and without any special boot procedures.
Yesterday, flashrom 0.9 was finally released. Here's a short passage from the release announcement:
After nine years of development and constant improvement, we have added support for every BIOS flash ROM technology present on x86 mainboards and every flash ROM chip we ever saw in the wild.
Highlights of flashrom include:
Please note that rewriting your flash chip can be dangerous and flashrom developers make no guarantees whatsoever. That said, many users have successfully replaced proprietary tools such as awdflash, amiflash and afudos with flashrom.
Download: flashrom-0.9.0.tar.gz
SVN: svn co svn://coreboot.org/flashrom/trunk flashrom
Debian: apt-get install flashrom
Do yourself a favor and try flashrom next time you want to upgrade your BIOS. No more floppies or bootable CD-ROMs with DOS/Windows binaries or similar crap. Run flashrom conveniently from the Linux command line, or even via SSH or serial console if you want...
If you want to generate a custom Debian live CD, including only the tools you want (and maybe additional tools you don't find in other live CDs) there's a really simple solution: live-helper.
Creating a basic bootable Debian live CD ISO image in the current directory is as simple as:
$ lh_config $ lh_build
That's it. The result will be a file called binary.iso, which you can either burn on a CD-ROM via
$ wodim binary.iso
or test in QEMU using a command line like this:
$ qemu -boot d -cdrom binary.iso
Of course there are many possibilities to customize the generated image to your likings, see the documentation in the Debian wiki, or the lh_config/lh_build manpages.
Please note that live-helper can not only generate CD ISOs, but also bootable DVDs, images for USB thumb drives, or netboot images.
There's also a nice GUI called live-magic which will make the process a bit easier if you don't like doing things on the command line.
There are a gazillion HOWTOs out there for flashing a BIOS image without having to resort to ugly "boot DOS from floppy" or "run Windows *.exe file from BIOS vendor" and other ugly stuff. Unfortunately, the proposed solutions are equally ugly (e.g. creating custom CD-ROMs which contain the "floppy" with DOS/Windows flash tools).
Folks, this is so much simpler than you think:
The flashrom tool (GPL'd, written for LinuxBIOS purposes, but works perfectly fine with proprietary BIOSes, too) will easily do what you want, on a running Linux system. No floppy crap, no CD-ROM crap, no DOS/Windows crap, no rebooting crap.
Install it:
$ apt-get install flashrom
Detect whether flashrom knows about your chipset/mainboard/BIOS chip:
$ flashrom
Read the BIOS image into a file:
$ flashrom -r backup.bin
Write a BIOS image (proprietary or LinuxBIOS) on the ROM chip:
$ flashrom -wv newbios.bin
WARNING: This will overwrite your current BIOS! Make sure you know what you're doing!
For the Debian-challenged, flashrom is available in source form too, of course:
$ svn co svn://linuxbios.org/repos/trunk/util/flashrom $ cd flashrom $ make
The list of supported chipsets, mainboards, and ROM chips is limited of course, but it's constantly expanding. Contact us on the LinuxBIOS mailing list if you want other hardware supported (or even better: if you have patches!). In many cases adding support for new hardware is pretty easy...
Suppose you want to try out Xen for the first time, and you're a bit paranoid careful because, well, you don't want to break your system. No problem, just download the Xen 3.0 Demo CD Image (a live CD). Or so I thought; it took me a loong time to even find a download link for that beast. There seems to be no ISO image for 3.0.4, but only for 3.0.3 (gah!).
Anyways, the live CD seems to try to mount /dev/sda as my CDROM drive, which is... um... stupid, as that's a harddrive. A SATA harddrive to be more specific. A dm-crypt'ed hard drive to be even more specific. So there's no way the live CD can ever mount that. I was dropped into a minimalist shell, but couldn't figure out how to fix anything from there, and a quick look at the docs didn't reveal anything either.
So here's my fix:
qemu -cdrom /dev/cdrom -boot dNice huh? QEMU's hard drive is an IDE drive, it's called /dev/hda (instead of /dev/sda), thus the live CD works fine.
(Yes, I'm sure this could be fixed "the right way" too, but this is a nice way to get quick results, i.e. a working Xen test setup)
Dear Lazyweb,
I was trying to boot Debian on a Sun Sparc Ultra 10 box yesterday, without success. I got myself this Sparc box from eBay many months ago, but until yesterday it was merely standing around here and taking up valuable space (just like the other dozen or so computers standing around in my room). So I thought I should really make some use of it, finally...
I booted it up and noticed that it came with SunOS 5.8 pre-installed. It boots quite fine into the graphical login prompt, but I don't have the root password (or the password for any other account). So my first task was to reset the root password. But I failed so far.
Out of curiosity I connected the machine to my laptop and ran nmap on it. It has several ports open (e.g. ntp, ssh, X11, nfs, ...), so I could probably try to find a remote root exploit (or run an ssh brute-force attack) and crack it open that way ;) While I might try that later just for the fun of it, I wanted to simply boot a Debian first and change the root password manually. That sounded simpler at first...
Anyways, here's what I tried so far:
As I had no experience whatsoever with Sparcs, it took me some time to read up all the stuff I needed... After a bit of googling, I found out that I need to press STOP+A to get into the boot prompt (the box has OpenBoot 3.19). There, I can type boot -s to boot into single user mode. Unfortunately, you still need the root password to boot into single-user mode. Argh!
Next, I found out how to boot from CD-ROM. Typing boot cdrom in the boot prompt should do the trick. So I downloaded and burned a the current Debian "businesscard" image for Sparc:
wget http://cdimage.debian.org/debian-cd/3.1_r1/sparc/iso-cd/debian-31r1a-sparc-businesscard.iso
cdrecord -eject -v speed=2 dev=/dev/hdc -data -pad debian-31r1a-sparc-businesscard.iso
Booting seems to work partially. SILO seems to start fine, and I get to the "boot:" prompt. When I press Enter I get to the point where it says "Loading Linux..." but then the screen turns black and nothing happens anymore (hangup). The same happens when I type "linux" or "rescue" on the "boot:" prompt.
The monitor works fine, SunOS 5.8 can display graphics etc., so it's probably not a hardware problem.
After that, I tried to perform a network boot. This was fun and I learned a lot about RARP and TFTP, as I have never played with this stuff before. While the netboot part itself worked, it didn't solve my real problem, unfortunately...
First, I installed rarpd and tftpd on my laptop:
apt-get install rarpd tftpd
In /etc/ethers I added a line which tells rarpd which MAC address should be assigned to which IP address. I looked up the MAC address of the Sparc box (it's displayed when you boot) and then added "xx:xx:xx:xx:xx:xx 192.168.0.20" to /etc/ethers. I configured my laptop to have the IP address 192.168.0.19: ifconfig eth0 192.168.0.19 broadcast 192.168.0.255 netmask 255.255.255.0. Of course, I plugged an ethernet cable in the Sparc box and in my laptop so they can talk to each other.
Then, I created /etc/xinetd.d/foobar which contained:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
user = nobody
wait = no
server = /usr/sbin/in.tftpd
# server_args = /tftp
}
This should tell tftpd to serve the Debian netinst boot image from /tftp, but that didn't work for me. So I commented out the "server_args = /tftp" and let tftpd fall back to the default location /tftpboot. You need to reload xinetd after any change: /etc/init.d/xinetd reload. Also, tftpd is compiled with TCP wrapper support, so you have to temporarily allow the respective connections, e.g. by adding "ALL: 192.168.0.20" to /etc/hosts.allow. Don't forget to remove that line again later on!
Now I downloaded the Debian netinst boot image for Sparc (hopefully the correct one):
wget http://http.us.debian.org/debian/dists/stable/main/installer-sparc/current/images/sparc64/netboot/boot.img
mkdir /tftpboot
mv boot.img /tftpboot/XXXXXXX
You need to place that image into /tftpboot using the name under which the Sparc box requests it. I found that name by net-booting the Sparc machine and watching the network traffic with Ethereal on my laptop...
The final steps: boot the Sparc box, type STOP+A, type boot net. The Sparc machine gets the boot image from my laptop just fine (it seems), and I get to the "Loading Linux..." part again. But then I have the same problem as with the CD-ROM boot: the screen turns black, nothing happens anymore...
Help?
Update 2006-03-22: I have posted some lessons learned.
Recent comments
1 day 4 hours ago
1 day 18 hours ago
5 days 15 hours ago
6 days 1 hour ago
1 week 4 days ago