[ale] Format C in linux (fwd)

John M. Mills jmills at tga.com
Fri Jun 2 15:47:29 EDT 2000



Roy -

On Fri, 2 Jun 2000, Roy Nix wrote:

> It seems my son installed Linux without partitioning and lost Windows 98.
> Can anyone tell us how format the hard drive from Linux so we can install 98
> again and then re-install Linux on a partition.

DISCLAIMER - I've not done this recently, and only with Win95. Others will
doubtless correct my errors and outdated suggestions, and I'll learn
thereby.

You need to run Microsoft 'fdisk' to recreate a partition for Win98; if
you don't still have a Win98 box available, perhaps a friend can help by
making a bootable DOS diskette with M$ 'fdisk' on it. There are probably a
few other low-level utilities which might be handy, but that's the
critical one.

1) Boot your box from the DOS diskette and delete the Linux partitions on
the HDD using M$ 'fdisk'.

2) Create a Win98 partition to receive the reinstallation.  Keep the
number of cylinders in this partition "reasonable" (<500) or see the Linux
HOWTO or Mini-HOWTO document on large disk drives for more specific
information. Make this the pimary partition. Install Win98 on it.

The rest of the disk is now available for Linux. A Good_Thing[TM].

3) Install Linux on the balance of the disk - RedHat and Mandrake
distributions set up Linux in one extended partition with logical
partitions inside it - I don't know about other distributions. This works
fine in most cases and is a 'no brainer' for first-timers.

With a bit more experience, you can manually partition the rest of the
disk, but this shouldn't be necessary for a fresh generic installation.

The installation program should not try to overwrite your Win98 partition
without giving you an opportunity to stop the installation.

4) At this point your box will still boot Win98 by default. You should
make a boot/recovery diskette which will start Linux - I believe this is
suggested by the RedHat installer, so you will normally have an
opportunity to make it. I _don't_ recall whether the RH installer offers
to set up a dual boot using LILO, but I believe it does so. Otherwise you
will find information in your new Linux filesystem in: /usr/doc/lilo-*/

Basically you edit a file named '/etc/lilo.conf' to tell the boot loader
the OS options and where they lie, then you run 'lilo' to make changes to
the disk's boot sector.

If you need to _undo_ this, M$ 'fdisk' has a little-documented [by M$]
option to rewrite the boot sector. Boot from the DOS diskette you used
to make the Win98 partition, and do:

> fdisk /mbr

Interestingly the advice on M$'s web site explaining de-Linuxation has
some errors: in particular, they suggest that Linux 'fdisk' is needed to
create the partition for Win*, which is wrong. You need the M$ product.
[8-)

I expect you'll get some additional advice and corrections. Once you have
your dual boot set up, it works thus:

1) Power or reboot the box.

2) At the 'LILO:' prompt you can type the nickname of the system you
   wish to boot, you can hit <SHIFT><TAB> to get a list of available
   boots, you can hit <CR> to immediately boot the default you've set up
   (it's the first one in the name list), or you can just wait and get the
   default after a timeout.

Even more than Win9*, Linux needs to shut down in an orderly fashion.
Current RedHat and Mandrake distributions intercept the <CTRL><ALT><DEL>
and do an orderly reboot - you can drop power when you see the BIOS
starting up. You can also command an orderly stop with the command:

 # shutdown -h now

You must be 'root' or 'su' to use this command, which I hinted with the
'#' prompt.

If you _do_ halt Linux in a disorderly manner (i.e., just drop power), you
will have to wait on your next Linux boot while the disk filesystems are
checked and (if necessary) fixed (like MacOS). This can take a few minutes
depending on your disk size and processor speed. Naturally you lose any
data which was being processed at the time of the crash, but that would
generally be true if you had manually commanded a shutdown without first
saving your running programs' data.

Final pedagogical note: get the habit of running Linux as an 'ordinary
user' and only becoming 'su' when necessary. The damage 'su' can do with
one misplaced keystroke must be experienced to be truly appreciated.

Cheers,

   John Mills
   Sr. Software Engineer
   TGA Technologies, Inc.
   100 Pinnacle Way, Suite 140
   Norcross, GA 30071-3633
   e-mail: jmills at tga.com
   Phone: 770-441-2100 ext.124 (voice)
          770-449-7740 (FAX)

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list