From owner-freebsd-questions Thu Jul 1 2:56:33 1999 Delivered-To: freebsd-questions@freebsd.org Received: from titan.metropolitan.at (mail.metropolitan.at [195.212.98.131]) by hub.freebsd.org (Postfix) with ESMTP id 33E9E14F33 for ; Thu, 1 Jul 1999 02:56:15 -0700 (PDT) (envelope-from mladavac@metropolitan.at) Received: by TITAN with Internet Mail Service (5.0.1458.49) id ; Thu, 1 Jul 1999 11:59:14 +0200 Message-ID: <55586E7391ACD211B9730000C11002761796C7@r-lmh-wi-100.corpnet.at> From: Ladavac Marino To: 'Dibyo Gahari' , Ladavac Marino , freebsd-questions@FreeBSD.ORG Subject: RE: how to get back /usr/bin files ? Date: Thu, 1 Jul 1999 11:53:20 +0200 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > -----Original Message----- > From: Dibyo Gahari [SMTP:dibyo@bali.net] > Sent: Wednesday, June 30, 1999 5:23 PM > To: Ladavac Marino; freebsd-questions@FreeBSD.ORG > Subject: RE: how to get back /usr/bin files ? > > > Thanks, Marino. > > But I still have a problem. > > At 21:37 30/06/99 , Ladavac Marino wrote: > > > [ML] This would make it seem as if you have physical access to > >the machine. Good. > > Yes. > > > If you have physical access to the machine, you can boot from > >installation floppy and chose fixit mode, insert fixit floppy and > then > >mount the previous / or /usr (wherever your /usr/bin resides) onto > /mnt. > > Would you explain it in details, because I have tried it, but failed. > What > is the exact & complete command to mount /usr/bin onto /mnt ? [ML] Once you have booted the installation disk and chosen fixit mode, and inserted the fixit floppy, you will get a root shell. During the boot, please take a look at what disk devices were detected--this is very important, and without that information no-one will be able to help you. Now, when you mention slices, I assume these are FreeBSD partitions (in FreeBSD jargon, slice means a DOS partition). For your purposes, you can use the so called "compatibility interface" which supports only one FreeBSD DOS slice (further partitioned into FreeBSD partitions). Let as assume that the disk is detected as wd0. In this case your FreeBSD / will be at /dev/wd0a. We shall mount that so that we can take a look at /etc/fstab. So, fsck /dev/wd0a (this should repair possible / filesystem damage) mount -t ufs /dev/wd0a /mnt (now your / should be available as /mnt) cat /mnt/etc/fstab (this will let you see where the other partitions were) Let as assume that the /usr was on /dev/wd0d fsck /dev/wd0d mount -t ufs /dev/wd0d /mnt/usr (now, your old /usr is visible as /mnt/usr) If there is no /mnt/cdrom, create one, but there will probably be one Take a look what device is your cdrom--we shall assume /dev/wcd0 insert CD #2 into the cdrom mount -t cd9660 /dev/wcd0a /mnt/cdrom your old /usr/bin is at /mnt/usr/bin. the cdrom /usr/bin is at /mnt/cdrom/usr/bin cd /mnt/cdrom/usr/bin cp login /mnt/usr/bin (actually, I think login is /bin/login, in which case cd /mnt/cdrom/bin; cp login /mnt/bin) you have your login now. umount /mnt/cdrom umount /mnt/usr umount /mnt exit you are done. > > Then, mkdir /mnt/cdrom, unless it already exists, and mount your > >2nd CDROM there. > > I can't mount 2nd CDROM onto /mnt/cdrom. There is no mount software > there. [ML] You need the fixit floppy, or mount_cd9660 which is there (omit the -t cd9660 from the mount line) > > Start copying from /mnt/cdrom/usr/bin into /mnt/(usr/)bin > > > > That's it. > > > /Marino > >> 2. > >> If I use the old drive as the main partition, how can I know the > dev > >> name of the second drive / File System (/dev/wd0s1, or wd0s1e, or > ?) so I > >> can mount it as my new partition ? > > > [ML] I would need more details to answer this question. > > I mean, if I have 2 harddrives, how can I mount the second drive > (slice: > /data) , to the first drive (slices: / , /usr , /var, swap) ? Should I > use > /etc/fstab ? But how can I know the exact /devname of the second drive > ? [ML] I believe this question has been answered above. /Marino > Thank you. > Regards, > Dibyo Gahari > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message