Configuration of Sony PCG-V505BX
- No Floppy Drive
- Windows XP
- Three partitions – Compaq Recovery, C: and D:
What’s so different?
It has three partitions two of which are ntfs. So I needed to resize them without damaging the pre-installed Windows XP. I had to do it using ntfsresize. So I used Knoppix to run Linux off a CD and run the program. Then I used the Red Hat installer’s utility to create partitions after ntfsresize created some extra space. I installed Linux. Then the lilo boot loader needed some tweaking. So I had to use Knoppix again and mount the root and make changes and run /sbin/lilo in to make those changes effective in the install and not Knoppix’s files in RAM.
Installing Red Hat Linux 8.0
1. Download ‘Knoppix – Linux on a CD’ ISO image on some other Linux computer
2. Burn the ISO image onto the CDROM using cdrecord
% cdrecord -scanbus Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J�rg Schilling Using libscg version 'schily-0.7' scsibus0: 0,0,0 0) 'Sony ' 'MSC-U03 ' '2.00' Removable Disk 0,1,0 1) * 0,2,0 2) * 0,3,0 3) * 0,4,0 4) * 0,5,0 5) * 0,6,0 6) * 0,7,0 7) * scsibus1: 1,0,0 100) 'MATSHITA' 'UJDA745 DVD/CDRW' '1.00' Removable CD-ROM 1,1,0 101) * 1,2,0 102) * 1,3,0 103) * 1,4,0 104) * 1,5,0 105) * 1,6,0 106) * 1,7,0 107) * % cdrecord -v speed=2 dev=0,0,0 -data knoppix.iso
3. Defragment the C: and D: drive in Windows XP
4. Boot the Sony laptop using the Knoppix CDROM we just created
5. Use ‘ntfsresize’ to resize the partitions
$ ntfsresize -i /dev/hda1 ntfsresize v1.7.1 NTFS volume version: 3.1 Cluster size : 512 bytes Current volume size: 5000937472 bytes (5001 MB) Current device size: 5000937984 bytes (5001 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 3637 MB (72.7%) Calculating smallest shrunken size supported ... You could resize at 4406213120 bytes or 4407 MB (freeing 594 MB).
I left this partition alone!
$ ntfsresize -i /dev/hda2 ntfsresize v1.7.1 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: xxx bytes (xxx MB) Current device size: xxx bytes (19488 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 5884 MB (58.8%) Calculating smallest shrunken size supported ... You could resize at 8810516480 bytes or 8811 MB (freeing 1189 MB).
I resized this partition which is C: and /dev/hda3 which is D:
$ ntfsresize -n -s 10000M /dev/hda2 $ ntfsresize -s 10000M /dev/hda2 Current volume size: 9999994880 bytes (10000 MB) Current device size: 16113323520 bytes (16114 MB) $ ntfsresize -n -s 10000M /dev/hda3 $ ntfsresize -s 10000M /dev/hda2 Current volume size: 3999993853 bytes (4000 MB) Current device size: 18885210624 bytes (18886 MB)
7. I booted using the Red Hat Linux 8.0 installation CDROM
7. I choose USB 3 Button Mouse
8. I used the fdisk mode to create partitions. Partitions looked liked this:
hda1 1 608 12 Compaq Diagnostics hda2 609 2567 7 NTFS/HPFS 2568 4863 f hda3 2568 4863 7 NTFS/HPFS
I deleted and created new partitions like this:
d // delete 3 // partition 3 d 2 d 1 n // new 1 // primary 1 // start 608 // end t // type of partition 1 // partition number 12 // Compaq Diagnostics n 2 609 +10000m // 10000MB partition t // type of partition 2 // partition number 7 // NTFS n 3 1884 +512m t 3 82 // linux swap n 4 1950 4863 n l 1950 +2000m t 5 83 // linux n l 2568 +4000m // if i remember right t 6 7 // NTFS n l 3078 +12000m // if i remember right t 7 83 // linux n l 3078 4863 t 8 83 // linux
Now Partitions looked like this:
hda1 1 608 12 Compaq Diagnostics hda2 609 1883 7 NTFS/HPFS hda3 1884 1949 82 Linux Swap hda4 2568 4863 f hda5 2568 3077 83 Linux hda6 3078 xxxx 7 NTFS/HPFS hda7 xxxx yyyy 83 Linux hda8 yyyy 4863 83 Linux
9. Then I installed Linux
hda1 Compaq Diagnostics hda2 C: NTFS/HPFS hda3 Linux Swap hda5 /junk ext3 hda6 D: NTFS/HPFS hda7 / ext3 hda8 /winux vfat
10. I again rebooted using Knoppix
11. Then I updated the lilo.conf. My working lilo.conf looks like this
% mount /mnt/hda7 % more /mnt/hda7/etc/lilo.conf prompt timeout=50 default=DOS boot=/dev/hda map=/boot/map install=/boot/boot.b message=/boot/message lba32 image=/boot/vmlinuz-2.4.18-14 label=linux initrd=/boot/initrd-2.4.18-14.img read-only append="hdc=ide-scsi root=LABEL=/" other=/dev/hda2 optional label=DOS table=/dev/hda % cd / % rm -rf /boot % rm -rf /etc/lilo.conf % ln -s /mnt/hda7/boot /boot % ln -s /mnt/hda7/etc/lilo.conf /etc/lilo.conf % lilo -v
12. Reboot and we are good to go!