Re: mounting md device



Walter Mautner wrote:
Matt Kowalczyk wrote:

Hello,

Recently, I installed Windows on top of my FC4 installation and I think
I screwed up. I booted into Knoppix and wanted to reinstall grub by
issuing the grub-install command but it returned with an error saying
that it could not find /boot. The reason I think that I screwed up is
because when I was installing Windows, I'm pretty sure that it removed
my /boot partition. Whether that was something I did by accident or that
Windows required, not sure. However, this leaves me with two options to
fix my machine so I could boot back into Linux.

1. How do I recreate the /boot partition and install grub?
2. I will have to backup my old data and reinstall linux.

The problem with option 2 is that I was using md raid0 setup and knoppix
is trying to mount each drive seperatly. e.g. /dev/hda1 /dev/hda2...
etc. Below is the copy of my backed up fstab file used in my original
system:

/dev/md0 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/md1 swap swap defaults 0 0
/dev/hda4 /mnt/volume1 ext2 defaults 0 0
/dev/hdd3 /mnt/volume2 ext2 defaults 0 0
/dev/sda1 /mnt/volume3 auto defaults,users 0 0

Well, a "fdisk -l" would help us a lot here. Since /boot contain[s|ed] your
kernel plus the initrd with the necessary raid modules, it can become a
bit tough to recover to a working linux state.
The /dev/md0 partition is composed of /dev/hda1 and /dev/hdd1, is there
a way that I could verify this? The problem I am having is that I am
pretty clueless about how I can access the / mount point. I tried to do
this:

mdadm -A /dev/md0 /dev/hda1 /dev/hdd1

Now to mount your raid0 (usefullness of software-striping is another issue)
you may have good luck with a knoppix cd/dvd and the backup of
your /etc/mdadm.conf.
Boot knoppix, then copy your backup of /etc/mdadm.conf (for version 2.x)
or /etc/raidtab over to the knoppix /etc ramdisk, then try the mdadm -A
thing (make sure your fdisk -l says "linux raid" type for the proper
partitions) and hope. Then try to mount /dev/md0 without any options
to /mnt. If it works out, you may then chroot /mnt (exit to go back) and
watch what you have left, maybe even make a new kernel compile and recreate /boot inside / as a folder.
Btw., I don't know what windows would have done with your /boot partition.
Usually /boot is too small for anything but wfwg3.11 or a bunch of linux
kernels/initrds. I much more suppose windows blew it all away ....

So I tried what you suggested and I got the same error. During this time, I also realized that I used LVM to setup the /dev/md0 partition. Which is probably why it is failing to mount as simply ext3... I could be wrong however, since my experience with LVM is limited. I just hope that this fact can shine additional insight to help solve this problem.

I did try to mount my swap partition, which is also software raid0 and when mounting it I got the error that it was indeed a swap partition and could not be mounted... as expected. This means that I am setting up /dev/md0 properly, where I fail is mounting it.

I was trying to look up some additional information on mounting LVM volumes in linux and the information I found was way above me. Anyone able to assist me here or provide me with a good resource?

Thanks,
Matt
.



Relevant Pages

  • Re: Partition inaccessible all of a sudden
    ... I've ran powerquest partition magic and windows checkdisk and none ... Knoppix is a Linux distro on a live cd. ... If Knoppix can't see the files, then you can try data recovery software. ...
    (microsoft.public.windowsxp.general)
  • Re: mounting md device
    ... I installed Windows on top of my FC4 installation and I think ... I will have to backup my old data and reinstall linux. ... The problem with option 2 is that I was using md raid0 setup and knoppix ...
    (alt.os.linux)
  • Re: Windows XP Will Not Boot (Fatal System Error)
    ... I forgot to note that I can use Knoppix to edit the files on my Windows ... partition, as well as the recovery console, if need be. ... Stop: c00021a {Fatal System Error} ...
    (microsoft.public.windows.mediacenter)
  • Re: External hard drive
    ... create a partition to use it. ... If Knoppix sees the data, ... be able to copy it off and then boot into Windows and format the drive. ... You will need a computer with two cd drives, ...
    (microsoft.public.windowsxp.hardware)
  • RE: Windows XP Reinstallation
    ... How to enable 48-bit Logical Block Addressing support for ATAPI disk drives ... I have an original copy of Windows XP Pro 2002. ... So I created only one partition and Installed Windows XP, ...
    (microsoft.public.windowsxp.help_and_support)