![]()
Debian 4.0 On A HP ZE4560us Laptop
The Goal Install Debain GNU/Linux 4.0 (aka Etch) on my laptop without destroying the current installation of Windows XP. Allow to boot into either operating system. The Laptop 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. 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. Installing Debian I actaully already had woody on here. But I chose to do a fresh install because I was still on kernel 2.4 and was worried about the udev problem. Plus since I had done so many special things to get things to work before (such as a patched kernel, compilied XFree86 from a development sourcecode snapshot, etc) then I did not want to bring along all the old stuff. I choose to get Etch on DVD instead of 13+ cd's. Everything I needed was on DVD #1. Boot from the DVD. 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 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, NOT the wireless card even if want to use the wireless in the end. Even though linux 2.6 now has a driver for the broadcom wireless 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. This also does something else vital: it causes the install scripts to install the wireless-tools package. This gives you the iwconfig command. I choose the K7 linux kernel since I have an AMD chip. Install LILO in the linux partition (/dev/hda5) NOT the MBR. 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. Duel Booting 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 LILO. 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 LILO can. But we can copy the linux boot sector into a dos file that windows can call. Get this command tool called bootpart. C:\temp>bootpart Boot Partition 2.50 for WinNT/2K/XP (c)1995-2002 G. Vollant (info@winimage.com) 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 Console Screen Here is some interesting information I ran across. I have not tried it yet but it may fix the annoyance of having a big screen with the linux console just a small square in the middle of it. To set the console to a resolution of 1024x768, add this line to lilo.conf: vga=791 VESA resolutions in Pixel on the Linux standard consolee.g. to get a resolution of 1024x768 with 16 Bit colour depth you have to add the following option to lilo.conf: vga=791 Don't forget to run "lilo" as root on command-line !! Kernel 2.6.18 This kernel solves a lot of the problems that I had with kernel 2.4. 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. The one odd thing I have found is that when it boots up it seems to take a very long time of uncompress the kernel. Be patient as the dots get drawn. It will eventually say "BIOS checksum verified" and then speed along. One theory I have is that the kernel is just that large because it has every single feature and module enabled. Maybe compiling a smaller kernel will fix this. PCMCIA Did not have a need for this. Network Adapter The install scripts should have done all of this automatically for you. But here are some settings in case it did not. edit /etc/network/interfaces. allow-hotplug eth2 iface eth2 inet static address 192.168.0.3 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.0.1 Now do # modprobe natsemi # ifup eth2 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. Wireless Adapter First make sure you have an ethernet cable plugged in and your internet connection works. Get the bcm43xx-fwcutter tool. I got the .deb package by searching for bcm43xx-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. During the install it will ask you if you want to download the firmware. Answer yes. Copy the *.fw files from /lib/firmware to /lib/hotplug/firmware. You can unplug the ethernet cable now. Then modprobe bcm43xx. 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 allow-hotplug eth1 iface eth1 inet static address 192.168.0.4 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 # wireless-* options are implemented by the wireless-tools package wireless-mode managed wireless-essid somessid wireless-key1 11:22:33:44:55 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.0.1 Note: Once you have the *.fw files you can copy them to a usb key and save them for later in case you reinstall linux. The bcm43xx-cutter does not have anything to do to with the driver. All it does is download the .fw files. So if you already have them you don't need to install it at all. Then you don't even need the ethernet connection. # /etc/init.d/networking stop # /etc/init.d/networking start USB # 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 sda: sda1 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. Sound Use aptitude to install alsa-base and alsa-utils. If things don't seem to work, try rebooting to make sure all of the alsa drivers get loaded. Unsure about the modules or kernel settings it is using. I did not have to do anything manaully. These seem to be the modules that got loaded that related to the sound: snd_ali5451 21516 0 snd_ac97_codec 83360 1 snd_ali5451 snd_pcm_oss 39200 0 snd_mixer_oss 15552 1 snd_pcm_oss snd_pcm 68996 3 snd_ali5451,snd_ac97_codec,snd_pcm_oss snd_timer 21316 1 snd_pcm snd 47524 6 snd_ali5451,snd_ac97_codec,snd_pcm_oss,snd_mixer _oss,snd_pcm,snd_timer snd_page_alloc 9928 1 snd_pcm Firewire I don't have any firewire devices so I can't test this Modem I didn't bother with the modem. I don't need it for internet since I have DSL. XOrg 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. Remaining Problems I noticed one odd thing. The networking does not seem to be active until I ping something from the laptop. After that it is okay. I don't know if this is problem with the broadcom driver or with my Buffalo WHR-G54S (with DD-WRT!) access point. The reason this is slight problem is that I can't boot the laptop then ssh to it from another computer until I physically log into the laptop first and ping something. I suppose I could have a startup script that does one ping to get things active. Date: 4/24/2007 copyright 2010, worldofjon.com |