Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 1999 11:53:20 +0200
From:      Ladavac Marino <mladavac@metropolitan.at>
To:        'Dibyo Gahari' <dibyo@bali.net>, Ladavac Marino <mladavac@metropolitan.at>, freebsd-questions@FreeBSD.ORG
Subject:   RE: how to get back /usr/bin files ?
Message-ID:  <55586E7391ACD211B9730000C11002761796C7@r-lmh-wi-100.corpnet.at>

next in thread | raw e-mail | index | archive | help
> -----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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55586E7391ACD211B9730000C11002761796C7>