[Grml] How to install GRML to one harddrive with Windows XP installed on this harddrive?
moss at mythic-beasts.com
Wed Dec 31 23:51:14 CET 2008
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
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
# 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
# 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.
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
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
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
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
(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
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.)
Now make a file system on partition 7.
# mkfs.ext3 /dev/sda7
If it complains that there is no such thing then do
This updates the kernel's information to the hard reality which parted has
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
More information about the Grml