LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   couldn't get into fdisk; deleted partitions anyway; bad idea? (http://www.linuxquestions.org/questions/linux-newbie-8/couldnt-get-into-fdisk%3B-deleted-partitions-anyway%3B-bad-idea-664580/)

dancehallwraith 08-22-2008 07:12 AM

couldn't get into fdisk; deleted partitions anyway; bad idea?
 
I've been trying to remove Windows from the Old Computer In The Attic and put Linux on it instead. Formatted c: (that may have been my first error), then tried a few Linux boot disks (most successfully MEPIS), but it either tried to run Linux off the cd drive (lots of panicked buzzing noises and very slow, but I have now seen Linux...) or installed half-way then kicked me into root with a lot of error messages. I got the idea from the errors that my hardware was too old to run this version, but couldn't get anything else to install on top.

I then tried to use fdisk, but linux couldn't recognise /dev/hda, and didn't produce anything for ls /dev/hd. I went back into my MSDOS boot floppy to look for partitions in fdisk, and it told me I had 3 non-MSDOS partitions. As I couldn't get MSDOS or Linux to do anything I thought I'd try deleting the partitions in MSDOS and try again. This may have been my 2nd bad idea. I got kicked into Grub (bash). I tried "root" and it told me I had zero partitions, then "kernel" and it told me I didn't have one. I went back into MSDOS and created a single MSDOS partition, then back into grub, where it still thinks I have no partitions. My cd drive now spins happily but I can't get it to boot (Debian; I got the idea this might work better for a 5 yr old machine).

So, have I now totally bust my machine, or is there a way I can get myself out of this (bearing in mind my general level of incompetence)? Can anyone point me to any resources?

Ta,
dw

GlennsPref 08-22-2008 07:23 AM

Hi, and welcome to LQ.:)

Use your mepis cd to partition your disk.

Find qtparted and you'll be set. GUI style.

You will need a / (root) partition a /home partition and a swap partition.

Since the mepis cd worked before, I hope it will again, long enough for you to get the disk right.

Regards, Glenn

pinniped 08-22-2008 07:40 AM

The disk may actually be named something like /dev/sda (rather than /dev/hda).

What sort of errors were you being given? Old CD drives struggle to read modern discs (in fact, really old ones will not read modern CDs at all) - there have been numerous changes over the years including change of dye, sensitivity, improved focusing of the laser, etc. If you can borrow a CD drive from a newer computer, you might have better luck.

Yet another option is to get your newer computer, pull out the HD, plug in the HD from the ancient beast, boot the Live CD, and prepare the HD to boot and perform an installation. As an example of what to do, here's what I did to install Debian from HD just two weeks ago:

1. partition the HD (160GB in my case) into a 2GB partition (to hold the boot files and one CD iso image - about 1GB in total - later on this 2GB partition is converted into a swap area) and a 158GB partition (for everything else)

2. format both partitions as ext2 (use 'tune2fs' to convert to ext3 if you wish)

3. Mount the 2GB partition and:
- create a 'boot' directory
- copy the 'vmlinuz' and 'initrd.gz' files into 'boot' from http://ftp.nl.debian.org/debian/dist...ages/hd-media/
- download the ISO file for installer CD #1 and put that in the same partition as 'boot'
At this point, the contents of the 2GB partition should look something like this:
-- some_debian_installer.iso
-- boot/
-- -- vmlinuz
-- -- initrd.gz

4. Create a 'lilo' config file or a 'grub' config file and install a bootloader to the HD.

If everything went well, you can restart the computer and the HD should boot and start the installer (then get a console and type 'poweroff' to shut down). If you plug that HD back in the old computer you should be able to start the installer and at least install a base system on the larger partition. Set it up without a 'swap' space. After a successful install, copy that ISO image somewhere onto the big partition so you can use it later. I usually create a '/home/iso' directory to put such things in. Once you have done that, you can recover the 2GB partition for swap:

A. if the partition is mounted, unmount it
B. use 'fdisk' to set the partition type to '82' hex (Linux Swap)
C. prepare the swap using 'mkswap' - be EXTREMELY careful - mkswap is a very stupid program and if you make a mistake it can destroy the MBR or destroy your boot partition
D. activate the swap with 'swapon'
E. put an entry in /etc/fstab to start up the swap space on reboot

Those are rather simplistic instructions leaving out a lot of the detail of commands to run etc - I just want to give you an idea of the work involved if you want to attempt an install from HD as opposed to swapping in a newer CD just for the install phase. :)

dancehallwraith 08-22-2008 08:44 AM

@GlennsPref By Jove, you've done it! Sorted; mepis now running on my machine. Fantastic; ta.

@pinniped Thanks for the advice; for some reason mepis isn't having any trouble with my hardware this time round. Interesting about the cd players. That machine's got 2 because I couldn't get some software to install. That explains the advice I got.


All times are GMT -5. The time now is 08:12 AM.