1827620 Members
3451 Online
109966 Solutions
New Discussion

Linux/MONDO

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

Linux/MONDO

I have a RH9 box that died. I restored it with mondo archive, problem is after all the data loads, I get a grub boot error. So normally I boot off the first CD again, break to a shell and mount some filesystems so I can edit the /etc/lilo.conf file. Then I run lilo -c "config_file_name" then I reboot and its ok. Here is the problem.

I can't remember how to mount my filesystes to see all of the files in /etc. I mounted /dev/sda1 /mnt. I see /etc but not all the files are there. Any idea what I am doing wrong as to why I cant see /etc/lilo.conf.anaconda file?
UNIX IS GOOD
9 REPLIES 9
Ivan Ferreira
Honored Contributor

Re: Linux/MONDO

If you have the filesystems on other partitions, you can use the dumpe2fs command to see the label, then you can know what partition is what filesytem, then you will need to mount the / partition, letts say, at /mnt, then the others partition under this directory, like /mnt/usr /mnt/var /mnt/home, etc.

Use fdisk -l to list partitions, if you remember the filesystem sizes, you can use this info to mount the filesystems, without checking the label.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Nobody's Hero
Valued Contributor

Re: Linux/MONDO

Thanks Ivan but I fell confused.

fdisk -l shows that /dev/sda1 is /.

so I :
mount /dev/sda1 /

I can see /var/usr/etc.....and so on. but when I cd into that dir it only has a few files in it. I know that all of the data was restored OK. I dont think I am mounting the right area.
UNIX IS GOOD
Steven E. Protter
Exalted Contributor

Re: Linux/MONDO

There should be an /etc/fstab file.

It should point to valid mount points on the partition.

mount -a should produce a helpful error message that can allow folks to further assist you.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Florian Heigl (new acc)
Honored Contributor

Re: Linux/MONDO

I'm a bit confused:
You get a grub error message and try fixing this from lilo.conf?

;)
yesterday I stood at the edge. Today I'm one step ahead.
Ivan Ferreira
Honored Contributor

Re: Linux/MONDO

Florian is right, are you using grub or lilo?

If you boot from the CD, you should mount the partition on /mnt, then chroot to /mnt

mount /dev/sda1 /mnt
chroot /mnt

If you use grub, use the grub-install /dev/sda to reinstall the loader.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Nobody's Hero
Valued Contributor

Re: Linux/MONDO

Yes, I dont use mondo to recover very often, but when I do, I install all 4 CD's everything installs fine. I reboot and get a grub error. I was never sure why this happens. So to remedy this, and I dont know why, I have in the past ran lilo -c /etc/lilo.conf and then I reboot and everything is fine, its just booting using lilo now instead of grub...i dnot know why, I just need to get this back up before my boss kicks me to the curb.


so now, I only have 2 partitions
/dev/sda1 which is /
and /dev/sda2 which is my data area.

I entered:

mount /dev/sda1 /mnt
cd /mnt
Now I can see /boot /var /sbin ...etc...
All the files I need are in these directories.

so I cd /mnt/etc I see everything
cd /mnt/boot I see everything...etc

when I run /mnt/sbin/lilo -c lilo.conf
I get cant find lilo.conf in /etc
so I cp lilo.conf to /etc
then I run it again, /mnt/sbin/lilo -c lilo.conf
then I get fatal: cant find /boot/boot.b

I guess I need / mounted or something?
everything is under /mnt not /.

I know this should be easy, I am lost here.
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: Linux/MONDO

Sorry if I am confusing everyone, I am a little on edge here.

When I boot off of the mondo CD and exit to a shell and do a df, here is what I see:

rootfs /
/dev/ram0 /
/dev/shm /tmp
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: Linux/MONDO

IVAN,

Can you reply so I can award points.

when I did what you said,

chroot /mnt
everything was in order.

what did the chroot instead of cd /mnt do that helped me see everything?
UNIX IS GOOD
Ivan Ferreira
Honored Contributor
Solution

Re: Linux/MONDO

Always Glad to Help
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?