> From: Michael Havens <[email protected]>
> Date: Sun, 3 Aug 2014 00:06:41 -0700
> To: LFS Support List <[email protected]>
> Subject: Re: [lfs-support] Please, teach me how to fix problems.
>
>
> On Sat, Aug 2, 2014 at 2:27 PM, Michael Havens <[email protected]> wrote:
>
> > It was mentioned that I might want to restart at the beginning of chapter
> > 6. Please, what do I need to rm -rf to do that?
> >
>
>
> sorry about the delay in my response. I had to go to work. Is this where
> you wanted me to post my answer? I'll have all day to play with this on


It's re please don't top-post.


> Sunday.
>
> root:/home/lfs#  ls -laF /mnt/lfs/
> total 128
> drwxr-xr-x 23 root root  4096 Aug  2 02:37 ./
> drwxr-xr-x  3 root root  4096 Jul 26 00:47 ../
> -rw-r--r--  1 root root    61 Aug  2 02:35 6.9glibc.compile.log
> drwxr-xr-x  2 root root  4096 Jul 29 17:26 bin/
> drwxr-xr-x  2 root root  4096 Jul 29 17:16 boot/
> drwxr-xr-x 14 root root  3340 Jul 27 00:16 dev/
> drwxr-xr-x  4 root root  4096 Jul 29 17:29 etc/
> drwxr-xr-x  2 root root  4096 Jul 29 17:16 home/
> drwxr-xr-x  2 root root  4096 Jul 29 17:24 lib/
> lrwxrwxrwx  1 root root     3 Jul 29 17:18 lib64 -> lib/
> drwx------  2 root root 16384 Jul 27 14:28 lost+found/
> drwxr-xr-x  4 root root  4096 Jul 29 17:16 media/
> drwxr-xr-x  2 root root  4096 Jul 29 17:16 mnt/
> drwxr-xr-x  2 root root  4096 Jul 29 17:16 opt/
> drwxr-xr-x  2 root root  4096 Jul 29 16:33 proc/
> drwxr-x---  2 root root  4096 Jul 29 17:31 root/
> drwxr-xr-x  3 root root  4096 Jul 29 17:18 run/
> drwxr-xr-x  2 root root  4096 Jul 29 17:16 sbin/
> drwxrwxrwt  4 lfs  root 12288 Aug  2 02:38 sources/
> drwxr-xr-x  2 root root  4096 Jul 29 17:16 srv/
> drwxr-xr-x  2 root root  4096 Jul 29 16:33 sys/
> drwxrwxrwt  2 root root 20480 Aug  2 03:50 tmp/
> drwxr-xr-x 12 root root  4096 Jul 28 14:06 tools/
> drwxr-xr-x 10 root root  4096 Jul 29 17:18 usr/
> drwxr-xr-x 10 root root  4096 Jul 29 17:16 var/
> root:/home/lfs# umount -v $LFS/dev
> udev has been unmounted
> root:/home/lfs#
>


OK. The intent is to:
----
* backup anything from under /mnt/lfs that you want to keep. Put any
  backups well-out-of-the-way - e.g. put them in a subdir of ~root/ and
  not under /mnt/lfs  .

  Personally, I'd just backup the lot:
  $ mkdir ~/_mnt_lfs.bkup.201408031030.immedpre-wipe_mnt_lfs-restart_end_ch5
  $
  $ (cd /mnt/lfs && find -P . -xdev -depth -print0 | \
     cpio -0pdam -v \
     ~/_mnt_lfs.bkup.201408031030.immedpre-wipe_mnt_lfs-restart_end_ch5 )
  $
  You can always, later, pick through the backup or just blitz in entirely,
  at your leisure.

  ** "Backup now, or take your chances." **


* check/verify that the backup looks ok - e.g. 'du -skx ...', 
  'diff -qr ...', &c.


* then remove everything from under /mnt/lfs *EXCEPT FOR* both
  /mnt/lfs/sources and /mnt/lfs/tools  .

  You might want to use (defensive) constructs such as:
  $ (cd /mnt/lfs && \
     rm --preserve-root --one-file-system -I -v -rf -- \
     ./opt ./media ./srv )
  $

  ; or similarly:

  $ (cd /mnt/lfs && find -P . -xdev -depth \
     ! \( -wholename './sources*' -o -wholename './tools*' \) \
     -delete )
  $


* double-check that you have got the backed-up toolchain from
  end of chapter 5, and that you can temp-unpack it to a tempdir
  (e.g. ~root/tmp/tmp-unpack-lfs-toolch-end_ch5/ ), and that it looks
  OK. (You might even - e.g. just out of interest - want to do a quick
  diff-qr between it and /mnt/lfs/tools/ ).

  Check that the permissions on the backed-up toolchain look ok: they
  should be 'root:root' per 'Changing Ownership' at end of ch.5 .


* if the (temp-unpack of the) ch5 backed-up toolchain dirtree looks ok
 per preceding step, then remove /mnt/tmp/tools (or move it to e.g. under
 ~root if you've not got a backup of it per preceding notes), and put the
 ch5 backed-up toolchain in its place. Be sure that you don't introduce
 any extra dir levels: i.e. ensure you still have /mnt/lfs/tools/bin and
 not /mnt/lfs/tools/tools/bin  .


* goto last page, 'Changing Ownership', of ch.5: start at the top, read it,
  and go from there.

  Bear in mind the earlier injunctions about being careful, following the
  book, &c &c.


----



rgds,

akh





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

Reply via email to