How to install GRML to one harddrive with Windows XP installed on this harddrive?

Dear users and developers,
I downloaded The latest stable release of GRML, and i Am very satisfied with this distro so i would like to use it on my harddrive. But I Am having problems.
I have one IDE harddrive with capacity 55,6 GB, with one NTFS partition in size 21,4 GB. In The rest of my harddrive, i created extended partition, but no EXT3 or other, i only created extended partition, no formatting it.
When I Am running GRML2hd script, The script is giving me information, that there is partition and free space above 34 GB. No NTFS word is occurring in this information. So:
Will GRMLhd2 format this extended partition automatically without destroiing my NTFS existing one? Or i have done a mistake, that i created extended partition? If so, i can remove this extended partition, but please, what i could do to install GRML to A hard disk with Windows Xp on it?
Grml2hd script is also giving me question, where to install boot manager. If to MBR or to other place. How to confirm The right choice by keyboard press, i AM visually impaired user.
Thank You for Your information. I do not like Windows Xp installations and removing wrongly created operating systems installation by using partition managers. So i would like to perform installation of GRML by right way.
Thank You for Your help.
With kindness regards.
Janusz Chmiel

Janusz and Josh
I'll try to spell out how to install as best I can. I'm offshore on the North Sea oil fields writing this from memory, but I'll do my best. You should have a look at the grml2hd documentation too. There is also some write up on http://grml.org/grml2hd
I will suppose that you only have one hard drive on your machine. grml 1.1 or later will see this as /dev/sda. grml 1.0 sees it as /dev/hda. Now you want to know how many partitions it has. As root do this
# parted /dev/sda print
The partition editor is the 'guts' behind gparted and it reads the boot sector of the disk to tell you how many partitions, what kind they are and what size they are. My new acer laptop came with 4 ntfs partitions. The first and fourth were hidden recovery partitions, the second was C drive and the third was an empty drive (for automatic backups). Before Vista, windows always expected to be the first primary partition on the first hard disk.
Windows XP is usually located on /dev/sda1 It is the first primary partition. There may be more than one partition. Potentially partitioning and installing can wipe out your system and I strongly urge you not to get rid of the system you used to until you are much more familiar with grml. In a year or two you won't have Windows in the house but you need to learn about linux and grml first. The first thing you should do is to back up the master boot record or mbr of the disk. I usually copy the first 63 sectors instead of just the first one as Windows keeps altering what it does in this first cylinder. Get a floppy disk, put it in the slot and do this (Make double sure there are no typing mistakes.)
# mount /dev/fd0 /mnt/floppy # dd if=/dev/sda of=/mnt/floppy/windows.mbr bs=512 count=63
Count = 1 is probably all you need but that is my habit. Sector by sector each 512 bytes at the very beginning of sda is copied into a file on the floppy. You can use a usb pen instead if you don't have a floppy drive. Put the pen drive in wait a couple of seconds then do
# dmesg | tail
in order to see what device label it has been given - say /dev/sdb1. Now if something goes really wrong you should be able to rescue your windows system by
# dd if=/mnt/floppy/windows.mbr of=/dev/sda
Your windows system should now boot as if nothing had ever happened, provided windows itself is untouched.
Janusz wrote: When I Am running GRML2hd script, The script is giving me information, that there is partition and free space above 34 GB. No NTFS word is occurring in this information. So:
Will GRMLhd2 format this extended partition automatically without destroiing my NTFS existing one? Or i have done a mistake, that i created extended partition? If so, i can remove this extended partition, but please, what i could do to install GRML to A hard disk with Windows Xp on it?
Grml2hd script is also giving me question, where to install boot manager. If to MBR or to other place. How to confirm The right choice by keyboard press, i AM visually impaired user. ===================================
Parted can be used as a long command line or within its own prompt. I suspect the latter will be useful. If you go parted /dev/sda you get this prompt:
(parted)
Now go help and you get all the commands available. Also the entire manual is also online at http://www.gnu.org/software/parted/manual/parted.html as a single html page
Go help mkpart and you are told how to make a partition from free space. Let's take Janusz's example. He has a 56GB hard disk with Windows XP occupyiing the first 34GB and free space after that. I would prefer to make 3 partitions here. The first for grml, the second for a swap partition and the third for the directory /home (the my documents of linux). The home directory on its own partition will make it easier if you had to reinstall the operating system as all the customisation files for the ordinary user are kept there. You can have a swap file, like the Windows pagefile.sys or 'virtual memory', but it is more usual in linux to have a separate partion. The swap partition should be no more than 2x or 3x the amount of RAM you have. More is a waste of space.
(parted) mkpartfs logical linux-swap 34GB 35GB
would be the command to make and format a swap partition in the available free space next to the windows partition (I usually put this partition here as Windows often does not comply with conventions so if the partition start gets trashed then it is only the swap and not the more valuable system or home partition.) Partitions can be primary or logical. Originally DOS could only boot from a primary partition but linux will boot from anywhere. Now we can make the other partitions. grml will format the system partition as ext3 by default but you should format the home partition yourself.
(parted) mkpart logical ext3 35GB 41GB
grml comes with 2.3GB of software and I think that 6GB would be enough for my purposes though I actually have grml on a 10GB partition of an 80GB disk at home. This leaves us 15GB for home.
(parted) mkpart logical ext3 41GB 56GB (parted) print
Disk geometry for /dev/sda: 0.000-56.679 gigabytes Disk label type: msdos Minor Start End Type Filesystem Flags 1 0.0GB 34.0GB primary ntfs boot 2 34.0GB 56.0GB extended n/a 5 34.0GB 35.0GB logical linux-swap 6 35.0GB 41.0GB logical ext3 7 41.0GB 56.0GB logical ext3
By convention for an msdos partition table there can only be 4 primary partitions. Parted has created the extened partition by default in order to maintain compatibility with the msdos style partion table. Parted does not make ext3 filesystems on the partition but only ext2. (They can be converted either way as one is a development of the other.)
(parted) quit
Now make a file system on partition 7.
# mkfs.ext3 /dev/sda7
If it complains that there is no such thing then do
# grml-rebuildfstab
This updates the kernel's information to the hard reality which parted has just written. Now make sure that you have everything running that you want to have running and run the script grml2hd and install to /dev/sda6 If it messes up then you should be able to recover OK.
Josh may need to resize his ntfs file system to create space for grml. Parted can do this also
# parted /dev/sda resize 1 0GB 20GB
would reduce Janusz's windows partition (the number 1 means the first partition) from 34 to 20 GB - provided it did not contain more than 20 GB of data. The resizing is done safely.
Hope this helps Moss

Janusz asked about where to install the boot loader when running grml2hd
By default it is placed in the partition boot sectors rather than the master boot sectors at the beginning of the disk. I always use grub rather than lilo as a bootloader. I'm more familiar with it. Write down which partition you installed grml and grub to. Let's say it was /dev/sda3
Installing to the mbr should be fine but when it goes wrong you may lose access to XP also, as well as the newly installed grml. This usually means you made a mistake somewhere. It can be rescued using the cd. But make sure you have a copy of the original mbr on a floppy or pen drive.
Installing to the partition means you avoid that but you will probably find that the 1st reboot loads into XP instead of grml. This can be overcome in several ways a) by making a boot option in C:\boot.ini in XP (Does not work in Vista as it boots differently) b) by booting the CD then at the first (isolinux) prompt go grub enter enter c) by having already make a separate boot floppy or usb pen.
You should now have a list of options but go 'c' to give you a grub command line
grub>
In grub terms /dev/sda3 is (hd0,2) So now go
grub> configfile (hd0,2)/boot/grub/menu.lst enter
This should load the grub menu and you just hit enter again to make it boot. If you had installed to the mbr instead of the partition then you don't need to do this it will boot straight into grml.
Moss
Teilnehmer (2)
-
Maurice McCarthy
-
Mgr. Janusz Chmiel