goof-up again
kwall@kurtwerks.com
kwall
Mon May 17 11:38:33 PDT 2004
On Sat, Oct 05, 2002 at 04:53:23PM -0700, Bob Hemus wrote:
> Kurt Wall wrote:
> >
> > Also sprach Bob Hemus:
> > >
> > > Bach again, What is the command line? I tried
> > > # cp /etc/inittab /dev/hdb1 /etc/inittab , but got this error message.
# cp /etc/inittab /dev/hdb1/etc/inittab
Note that missing space between /dev/hdb1 and /etc/inittab.
> > > cp: copying multiple files, but last argument (/etc/inittab) is not a
> > > directory
Right -- what "cp" thought you were trying to do was cp /etc/inittab
*and* /dev/hdb1 to /etc/inittab.
> > > Try `cp --help' for more information.
> > > Read --help to no avail. Do I need to make hdb1 a directory?
> >
> > /dev/hdb1 is a device node for a disk partition, not a filesystem.
Meaning that /dev/hdb1 needs to be mounted somewhere. It doesn't matter
where. For example,
# mkdir /mnt/hdb1
# mount /dev/hdb1 /mnt/hdb1
The contents of /dev/hdb1 can now be accessed at /mnt/hdb1.
-- or --
# mkdir /foo
# mount /dev/hdb1 /foo
At this point, the contents of /dev/hdb1 are now accessible under
/foo.
> > Try:
> >
> > # cp /etc/inittab /foo/etc/inittab
> >
> > where /foo is the filesystem that lives on /dev/hdb1.
> >
> > For example, on my box, /usr/local is mounted on /dev/hda5, as this
> > entry from /etc/fstab attests:
> >
> > /dev/hda5 /usr/local ext3 defaults 1 2
> >
> > and as this report from mount also attests:
> > # mount
> > /dev/hda2 on / type ext3 (rw)
> > /dev/hda1 on /boot type ext3 (rw)
> > /dev/hda3 on /usr type ext3 (rw)
> > /dev/hda5 on /usr/local type ext3 (rw)
> >
> > Kurt
> > --
> > "Beware of bugs in the above code; I have only proved it correct, not
> > tried it."
> ------------------------------------------------------------------------------------------------------
> I have returned. When I get a few minutes I'll send pix of my baby
> great-great-grandaughter.
Yow.
> Kurt, I left all of your last message so you might remember. I think
> what started this whole thing, I was screwing around with LFS and I
> think I buggered my /etc/bash file, so my /etc/inittab won't go even if
> I copied it in. I think I need to copy bash back into the partition.
>
> About foo, is that hdb1? Or do I need to make Hdb1 a directory to copy
> to it? That's where my whole program resides. I think when I re-do
> everything it'll be the last timm!
No, not necessarily. As I explained above, "foo" needs to be the mount
point where hdb1 is mounted.
Kurt
--
What this country needs is a good five cent microcomputer.
More information about the Linux-users
mailing list