Debian 5.0 Linux On A HP ZE4560us Laptop
Install Debain GNU/Linux 5.0 (aka Lenny) on my laptop without destroying the current installation of Windows XP. Allow to boot into either operating system.
It is a Hewlett-Packard notebook HP Pavilion ZE4560us. Some technical details of this notebook:
See the complete output of "lspci" here.
See the complete output of "lspci -vv" here.
See the complete output of "dmesg" here.
See the complete output of "lsmod" here.
Problem #1: Making Room For Linux
The hard drive came formatted as one big NTFS partition. I did not want to mess up the current Windows XP so reformatting the drive into 2 partitions has not an option. FIPS won't resize NTFS. I found a windows/dos disk partition utility called bootitng that works with NTFS. It has a 30 day free trial you can download. Use it to make an iso cd image. Using the cd image to create a CD results in a bootable cd. No need to install it, just go into maintence mode. Then resize your partiition to get some free space. I choose to have 3Gig free.
I actaully already had Debian Etch on here. But I chose to do a fresh install just to know how to do it.
I choose to get Lenny on a DVD instead of the cd's. Everything I needed was on DVD #1. I got the i386 one. Boot from the DVD. I choose to do the expert install so I could have total control.
When you partition the disk for the linux partitions remember not to touch the /dev/hda1 partition. I choose the manual method. I also choose the "old" way instead of LVM since I can't really add extra hard drives to the laptop. I used 2.9 Gig for ext3 and 32MB for swap space. I did both as logical partitions. This gave me /dev/hda5 and /dev/hda6.
Here is the tricky part. When it detects the network hardware, choose to use the on-board ethernet (ie. National Semiconductor DP83815), NOT the wireless card (it showed it as "firewire ethernet" which I found odd) even if want to use the wireless in the end. Even though linux 2.6 has a driver for the broadcom wireless chip it can't use it without the firmware. But you have to install a debian package later which downloads the firmware from the internet. It can't include it in the package due to legal reasons. So we need the wired ethernet connection so we can access the internet.
I choose the linux 2.6-686 kernel. Even though this is really an AMD CPU the 686 will work. Besides there is no longer for a K7 kernel like there was in Debian etch.
I choose "targeted" drivers in initrd.
Install Grub in the linux partition (/dev/hda5) NOT the master boot record. Don't make it active. We will let windows boot from the MBR.
You need to turn off "USB legacy support" in the BIOS the next time you reboot, otherwise your machine will crash when trying to load a USB kernel module.
At this point you can still only boot into windows. We are going to let the NT boot loader let us choose the linux partition which will in turn call Grub. This way we don't upset Windows. But there is a trick. Windows only lets you multiboot into other windows operating systems. It can't just call a boot sector directly like Grub can. But we can copy the linux boot sector into a dos file that windows can call.
Get this command tool called bootpart.
Boot Partition 2.50 for WinNT/2K/XP (c)1995-2002 G. Vollant (firstname.lastname@example.org)
WEB : http://www.winimage.com and http://www.winimage.com/bootpart.htm
Add partition in the Windows NT/2000/XP Multi-boot loader
Run "bootpart /?" for more information
Physical number of disk 0 : ae32ae32
0 : C:* type=7 (HPFS/NTFS), size= 35985568 KB, Lba Pos=63
1 : C: type=5 (Extended), size= 3084480 KB, Lba Pos=71971200
2 : C: type=83 (Linux native), size= 3052318 KB, Lba Pos=71971263
3 : C: type=5 (Extended), size= 32130 KB, Lba Pos=78075900
4 : C: type=82 (Linux swap), size= 32098 KB, Lba Pos=78075963
This shows me my linux partition is on #2
C:\temp>bootpart 2 c:\bootlinx.bin Linux
This will create a file on the c: drive and add a line to boot.ini
So far I have not had to get the kernel source and compile my own because the stock kernel has modules and flags for everything we need. APCI is enabled which will trap the power button so linux can be shut down gracefully.
Did not have a need for this.
The install scripts should have done all of this automatically for you. But here are some settings in case it did not.
iface eth0 inet static
# dns-* options are implemented by the resolvconf package, if installed
# modprobe natsemi
# ifup eth0
Note: I mention modprobe in several sections. But in reality when etch is installed it sets the startup so all the modules get loaded for you. So most of the time you don't have load any of these modules. But if you compile your own kernel, this information will help you know which ones you need.
First make sure you have an ethernet cable plugged in and your internet connection works.
My chip is the BCM4306 802.11b/g Rev 2 chip as shown by lspci. That means I have be using the b43legacy driver So I can use the b43-fwcutter tool since it is the correct version. If you have a different chip you need to look at this linuxwireless.org to see what you need to do. I got the .deb package by searching for b43-fwcutter on www.debian.org. It is not on the dvd because it is a contrib package. This website has instructions on how to change your apt sources to get it that way instead. You can also use a windows machine to get the .deb file and then ftp it or put it on a usb memory stick to get it to the laptop.
First you need use aptitude to install 2 packages from the dvd: wireless-tools and bzip2.
Then use aptititude to install the b43-cutter package.
Note: if you copied the .deb file manaully to the laptop, aptitude won't know about it. It that case you can manaully install it with:
# dkpg -i b43-fwcutter-011-5_i386.deb
During the install it will ask you if you want to download the firmware. Answer yes. It will download the firmware files and put them in the correct place for the kernel.You can unplug the ethernet cable now. Then modprobe b43legacy. Type in iwconfig (this command is in the wireless-tools package) and see if the broadcom shows up. Now we need to edit /etc/network/interfaces to define the ip address and to specify the wireless settings such as essid and the WEP key. I don't know if WPA works or not.
# The primary network interface
iface wlan0 inet static
# wireless-* options are implemented by the wireless-tools package
# dns-* options are implemented by the resolvconf package, if installed
# /etc/init.d/networking stop
# /etc/init.d/networking start
You may need to reboot.
I would also recommend commenting out the eth0 section so as not cause problems with two network devices on the same network.
# modprobe usbcore
# modprobe ohci_hcd
USB Flash Drive
Insert the usb flash drive.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
hub.c: USB new device connect on bus1/2, assigned device number 2
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: CREATIVE Model: NOMAD_MUVO Rev: 0001
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 126977 512-byte hdwr sectors (65 MB)
sda: Write Protect is off
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
# mount -t vfat /dev/sda1 /mnt
Don't forget to umount /mnt before removing it.
USB Floppy Disk
Plug in the usb floppy drive. Insert a floppy disk.
# mount -t vfat /dev/sda /mnt
Don't forget to umount /mnt before removing the disk.
not tested yet
I don't have any firewire devices so I can't test this
I didn't bother with the modem. I don't need it for internet since I have DSL with a wireless router.
In aptitude select the xorg package. Install it. It will automatically detect the hardware and set up the configuration files. It properly detected the ATI Radeon Mobility graphics chip and set the screen to 1024x768. It detected the built-in mouse pad and my Fellowes usb mouse.
Next install the "menu" package. This will let other packages put things on the menus.
Next install your favorite window manager. I choose xfce4. I also chose the xfce-battery-plugin, xfce-wavelan-plugin.