Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
RH9 2.4.20-24.9 kernel on A7N8X athlon board with 512M ram. One 60G WD IDE and two WD 120GB SATA drives.
I think I did something stupid, but my data is still there and I'd like to mount my partitions.
I deleted an XP partition (then /dev/hda1) using diskpart. I've always read that I should use windows tools to deleted windows partitions. I lost grub in the process, however, and can't get it back. When I boot into knoppix (where I am now) or redhat's rescue mode I can mount the remaining linux partitions and they are all present and accounted for. The only thing that troubles me is that fdisk tells me that my extended partition is of type f (see below). And it turns out all of my logical linux drives exist on this partition. I wasn't aware of this when I deleted my primary windows partition. What does this mean that I have done? Can I change that to a linux partition? I don't want windows anymore. Will my linux partitions be ok where they are or should I back up everything and repartition?
As you can see I've reclaimed the space left from deleting my windows partition (was /dev/hda1) and it is now /dev/hda4. All of my previous partitions seem to have shifted down a drive , e.g. was hda2 is hda1, etc.
>fdisk /dev/hda
/dev/hda1 * 2198 2324 1020127+ 83 Linux
/dev/hda2 * 2325 2579 2048287+ 83 Linux
/dev/hda3 2580 7297 37897335 f W95 Ext'd (LBA)
/dev/hda4 1 2197 17647371 83 Linux
/dev/hda5 2580 5129 20482843+ 83 Linux
/dev/hda6 5130 6660 12297726 83 Linux
/dev/hda7 6661 7170 4096543+ 83 Linux
/dev/hda8 7171 7297 1020096 82 Linux swap
As I said grub disappeared from my MBR when I wiped out partition 1. I managed to install stage1_5 to the MBR but only get the grub prompt. I do the following:
grub> root (hd0,0) // my /boot partition.
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/menu
.lst"... succeeded
Done.
Unable to mount root fs on 09:02 . (lspci listing below) My / partition is /dev/hda2. I do
rdev /boot/vmlinuz on my /dev/hda1 and get "Root device /dev/hda2". Should that be set to my / or my /boot directory?
I have those two SATAS set up as a logical volume of 240G I have enough room on them to cpio my main ide drive, but I can't get the logical volume recognized.
If I mount my /dev/hda2 and chroot /mnt/hda2 and do pvscan from redhat rescue It shows both physical volumes and my group name, but when I run vgscan it says something about half the extents missing and some errors. I can't reproduce it now since I don't know how to load my lvm-mod from knoppix after a chroot. Anyway, if anyone has any ideas, I would really appreciate a little help here. I'm kind of spinning my wheels at this point.
Thank you very much for your reply. And on Christmas eve yet.
Actually, though, my /boot partition is the one corresponding to /dev/hda1 or (hd0,0) if you're grub. I know cuz I can mount it booting from another installation (rescue/knoppix) and see my kernel and grub directory there. Also, you'll notice that my setup (hd0) command correctly id's my boot and grub locations.
I'm an impatient man when my box is ailing, so I took a circuitous route to a remedy, since I didn't have the skills to go straight to the solution. I figured I'd use redhat's knowhow, so I used my install disk to do an absolute minimal install with all of my partitions locked against changes. It wasn't the most elegant solution, but it got me up and running again. I got my lv's back. I had to use rescue to do an rpm re-install of my glib packages to the latest versions. Rpm and a bunch of other things were failing on /lib/tls/libpthread.so. There was some linking problem that ld couldn't get to.
My only remaining concern is about the win95 extended partition. Is there some relationship between a primary partition and an extended one in XP, cause I wiped out the windows primary partition? Also, is there any way to safely change that partition id from f to 85? I don't have any windows installations and don't plan on acquiring any, except perhaps with vmware. Is it ok the way it is or should I do something about it?
Thanks again for your assistance. Have a great day off tomorrow
Ok. I guess I'm not entirely with it. I'm recalling that my XP ntfs filesystem was on /dev/hda1. When I deleted that partition using XP's diskpart, I'm thinking that the order of the drive numbers shifted, just like c, d, e, etc. would do on a windows box if one of the partitions were deleted. Is that not the case? So that what was hda2 became hda1, hda3 became hda2, etc. Then even though I deleted /dev/hda1, it would still be there. Isn't that true? Nevertheless, that is not what concerns me. I'm just trying to clarify.
Looking at the output of my fdisk listing, however, it looks like I created my linux logical drives on a windows extended partition. Would you agree? My question is, is it ok to leave it that way? Can I change the partition type without repartitioning, should I change it, or should I just leave it the way it is?
hde and hdg are physical volumes in a logical volume group, by the way.
[root@localhost mooreg0]# /sbin/fdisk -l
Disk /dev/hdg: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/hdg doesn't contain a valid partition table
Disk /dev/hde: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/hde doesn't contain a valid partition table
Disk /dev/hda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 2198 2324 1020127+ 83 Linux
/dev/hda2 2325 2579 2048287+ 83 Linux
/dev/hda3 2580 7297 37897335 f Win95 Ext'd (LBA)
/dev/hda4 1 2197 17647371 83 Linux
/dev/hda5 2580 5129 20482843+ 83 Linux
/dev/hda6 5130 6660 12297726 83 Linux
/dev/hda7 6661 7170 4096543+ 83 Linux
/dev/hda8 7171 7297 1020096 82 Linux swap
Partition table entries are not in disk order
Now that I have my system back up again -- and yes a grub re-install was probably all I needed -- the
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.