Getting a new hard disk

Getting a new hard disk

Post by Bruce Merr » Fri, 11 Jul 1997 04:00:00



Hi

I'm thinking of getting a bigger hard disk, although its not urgent yet.
I'll explain my setup first:

hda:
-------------
MBR: LILO (I know it could be in the extended partition, but it works
here)
-------------
hda1: C: drive (windoze 95) (active)
-------------
hda2: extended partition
 |
 +- hda5: D: drive (windoze 95)

hdc:
-------------
hdc1: extended partition
 |
 +- hdc5: root filesystem (ext2)
 +- hdc6-8: swap
 +- hdc9: ext2

hdd: CD-ROM

Now for the actual change, I assume I could temporarily take out the
stiffy drive, mount the new hard drive there as hdb, then copy the
entire filesystem across using cp -ar (I think that takes care of
symlinks, fifos, devices etc; please tell me if I'm wrong!).

To recreate the LILO map I'd just rerun /sbin/lilo, but with a chroot to
the mount point of the new filesystem (I think lilo has an option for
that). This part I'm a bit worried about, because lilo.conf specifies
hdc5, but the images on hdb which will only become hdc on the next boot.
Will it take the offset of the image in hdb and then look for it on hdc
on the next boot?

Then I'd take out the old hdc and put the new one in. Oh yes, I'd have
to modify fstab a bit, because I might move stuff like swaps around a
bit, maybe give a bit of the drive to DOS.

If anybody can confirm that this procedure will work, or won't work, I'd
appreciate an email.

I have one other concern: The disk is likely to have more than 1024
cylinders, which the LILO docs say can be a problem. I don't really
understand them, but it seems to me that there are 3 potential problem
areas:

the BIOS
LILO
FDISK

The BIOS I will check on with a dealer, but I need to know about LILO
and FDISK. If it helps, I am using LILO ver 19 and fdisk ver 2.1

Thanks a lot
Bruce

 
 
 

Getting a new hard disk

Post by Andrew Hatel » Tue, 15 Jul 1997 04:00:00



> Hi

> I'm thinking of getting a bigger hard disk, although its not urgent yet.
> I'll explain my setup first:

> hda:
> -------------
> MBR: LILO (I know it could be in the extended partition, but it works
> here)
> -------------
> hda1: C: drive (windoze 95) (active)
> -------------
> hda2: extended partition
>  |
>  +- hda5: D: drive (windoze 95)

> hdc:
> -------------
> hdc1: extended partition
>  |
>  +- hdc5: root filesystem (ext2)
>  +- hdc6-8: swap
>  +- hdc9: ext2

> hdd: CD-ROM

> Now for the actual change, I assume I could temporarily take out the
> stiffy drive, mount the new hard drive there as hdb, then copy the
> entire filesystem across using cp -ar (I think that takes care of
> symlinks, fifos, devices etc; please tell me if I'm wrong!).

Why bother removing anything? Just insert the new disk as hdb.
Its OK to dangle it out of the case for a few hours till you get your
transferring done.

Use tar rather than cp. cp won't copy a symbolic link, it copies the
thing linked to instead.
tar to the standard output and pipe this into another tar to untar
everything. Or look at cpio.

Quote:

> To recreate the LILO map I'd just rerun /sbin/lilo, but with a chroot to
> the mount point of the new filesystem (I think lilo has an option for
> that). This part I'm a bit worried about, because lilo.conf specifies
> hdc5, but the images on hdb which will only become hdc on the next boot.
> Will it take the offset of the image in hdb and then look for it on hdc
> on the next boot?

boot from a floppy?

Quote:> Then I'd take out the old hdc and put the new one in. Oh yes, I'd have
> to modify fstab a bit, because I might move stuff like swaps around a
> bit, maybe give a bit of the drive to DOS.

> If anybody can confirm that this procedure will work, or won't work, I'd
> appreciate an email.

> I have one other concern: The disk is likely to have more than 1024
> cylinders, which the LILO docs say can be a problem. I don't really
> understand them, but it seems to me that there are 3 potential problem
> areas:

read the big disk mini howto.

The BIOS and also disk filesystems based on ms-dos (e.g. win 95's
vfat16) can only count cylinders up to 1023. So you can only boot from
or create dos/w95 partitions in that range.

Linux can count to larger numbers. You can create linux partitions
beyond the 1023rd cylinder. You can do any of these things:

Create a small (<504MB)  dos/w95 partition on the new disk first,
preferably a primary partition so that dos/w95 doesn't even have to
think beyond 10 bits (note this will become D: automatically). Create
your linux partitions afterwards beyond this.

Enable "Large mode" remaping in your bios. This halves the number of
cylinders and doubles the number of heads (on my machine anyway). Now
you can create a reasonable dos/w95 partition of up to 1000MB and use
the rest of the disk (still cylinders > 1023) for linux. Again make the
dos partition primary and it will magically be D: Again do the dos/w95
partition first so it can grab the low numbered cylinders.

Enable LBA remapping in your bios - this rempas all of the disk into
cylinders numbered less than 1023 by having a ridiculous number of
heads, e.g. 255. Avoid doing this as it is wasteful for two reasons: 1)
The size of the disk will be rounded down to achieve the remapping. 2)
Dos compatibility requires that each partition start with a few k of
info written in an otherwise empty cylinder - each cylinder is now
several MB of storage.

A few other things I found:

The partition table keeps the chs info. Linux and OS/2 fdisk will not
change it. So if you try one mapping and then select another, these two
fdisks will always complain that the partition table is wrong. dos 6.2
and dos5 (and presumably earlier) fdisk will write the mapped chs into
the table if necessary and this fdisk can be used to rewrite the table
by creating a small partition and deleting it again.

Before changing the mapping, remove all existing partitions.

Dos fdisk cannot remove non dos partitions.

Unfixed OS/2 warp 3.0 fdisk cannot cope with a mapping containing 255
heads.

Some versions of linux fdisk are more reliable than cfdisk.

The new big disk soon fills up :-)
Andrew

 
 
 

Getting a new hard disk

Post by Jim Buchan » Thu, 17 Jul 1997 04:00:00


: I have one other concern: The disk is likely to have more than 1024
: cylinders, which the LILO docs say can be a problem. I don't really
: understand them, but it seems to me that there are 3 potential problem
: areas:

I've not found this to be a problem if I use LBA mode (makes the drive
look like it has fewer than 1024 cylinders), or if I locate the root
partition entirely below 1024, and load LILO on the MBR.

Surely there are other issues as well, but I've never had any problems
with large disks using either of these methods.


=================== http://www.iquest.net/~jbuchana ======================
I've been higher than stardust, I've been seen upon the sun.
I used to count in millions then, now I only count in ones.
 -Ronnie James Dio
==================== http://hybiss.delcoelect.com ========================

 
 
 

1. Replacing Hard Disk - Copying Linux system to new Hard Disk ????

Simple.

1) create a lilo boot disk with lilo, and the kernel on it (email me if you
   need to know how to do this too)

2) install the new drive in the system, create a filesystem on it, and
   mount it on, say, /mnt

3) copy the filesystem over, making sure to preserve permissions, and
   exclude /mnt and /proc.  Some ways to do this are

cp -a -x / /mnt
        note that the -x means only stay on one filesystem, so if you
        normally have more than one filesystem mounted, you'll need to copy
        those over, too.

( cd / ; tar --atime-preserve -l -p --same-owmer -v -cf - / ) | ( cd /mnt ;
tar --atime-preserve -p --same-owner -xf - )
        but all as one line...

4) after veryfying everything looks good, you can remove the old system,
   reboot off of the boot disk, and re-install lilo on the new disk.

--
Windows: I can play Doom!              |RedHat Linux 2.0.31pre-2 i486
Linux: I can be a file server, be a Web|Because reboots are for upgrades!
server, run the accounting package with|http://www.wpi.edu/~rasmusin/pgp.html
twelve terminals AND play Doom!        |for pgp key.        frank sweetser

2. Support for the G400 in June

3. Hard disk upgrade - how to get everything (linux/Windows95) on new disk

4. Making Linux to recognize more than 64MB of RAM

5. How to lock the bad sectors on the hard disk without reformatting the hard disk !!??

6. mounting local disk linux partition on w9x

7. Ultra 5 IDE hard disks - can I use any PC hard disk?

8. success: STB Velocity 128 AGP & XSuSE_NVidia

9. can we copy an installed Linux on a hard disk onto another hard disk

10. Disks getting hit hard

11. getting lilo on a new hard drive

12. i am getting the following error while installing LRP onto Hard disk?

13. My Brand New Hard Drive Only Gets .95MB/s!!!!