Building LFS/BLFS on USB.

Tijnema ! tijnema at gmail.com
Sat Apr 7 02:25:28 PDT 2007


On 4/7/07, Michael Shell <list1 at michaelshell.org> wrote:
> On Fri, 6 Apr 2007 10:09:25 +0200
> "Tijnema !" <tijnema at gmail.com> wrote:
>
>
> > ps. I don't know if it is a big problem, but i have no device nodes in
> > /dev, except /dev/console. I tried to copy them from my system, but i
> > can't because they act like very big files..., and so i get a error
> > msg that there's no space left on the device. So, do i need to force
> > udev or something to create devices in /mnt/initrd/dev?
>
>
> Use:
>
> cp -a
>
> -a is the same as -dpPR and the -R option treats special files
> as special files.
>
> FWIW, cp -a can use used to backup a running system (well, as long as
> things aren't running that are making changes to the filesystem). A big
> problem is that cp -a / /mnt/backupdisk will descend into /mnt. The -x
> option may help here, but a lot of cp's out there have a broken -x
> implementation. Also, it's still a problem if you have mounted
> filesystems you want to back up. Putting it all in a script seems to be
> the way to go.

Well, i have /dev/hda1, /dev/hdb1, /dev/hdb2 mounted as filesystems
(/data, /, /boot), /dev/hdb3 as swap and /dev/sda1 as /mnt/usb. So
will i be able to copy the whole /dev dir, or would i need to skip
/dev/hd{a1,b1,b2,b3} and /dev/sda1? and how to get those if i need to
skip them??
>
> I always thought that it would be handy to have a wildcard that meant
> "all except for this match". Some syntax like:
>
> cp -a /*!mnt /mnt/backup
>
> which would copy everything except /mnt
>
>
>  Mike Shell

Interesting thought:) But i should prefer the syntax:
cp -a /* !mnt /mnt/backup
This could be written quite easy in a Shell script, but this would
break the cp command, because it won't be able to copy files starting
with ! anymore...

Using your syntax would be same problem, cp will now copy any files at
/ that end with !mnt, so /abc!mnt, /def!mnt /myfiles.ext!mnt . You
might be able to split that, but what if a user really wants to copy
those files?

Tijnema
>
> --
> http://linuxfromscratch.org/mailman/listinfo/blfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>



More information about the blfs-support mailing list