WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC inside chroot  (Read 6735 times)

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: TC inside chroot
« Reply #15 on: October 13, 2010, 12:30:32 PM »
The only thing I can think of is to check each step the initialization process. The most common cause is that it can't load the rootfs. Since it definitely isn't an out-of-memory condition, we must look at the whole process. I gather you have advanced expertise; please forgive the simple questions.

Are you using grub or syslinux to load the iso? What is the value of the initrd parameter? Can you verify by loop-mounting the iso that the file exists at the specified location? I've had this problem happen when forgetting the leading slash.

If this checks out, verify the root filesystem. You should have /init:
# ls -l /init
-rwxr-xr-x    1 root     root           370 Aug 16 20:21 /init

which requires /bin/sh:
# ls -l /bin/sh
lrwxrwxrwx    1 root     root             7 Sep 19 22:25 /bin/sh -> busybox

I figure something has to be going wrong before this point, but I will elaborate on the rest of the sequence for completeness. /init executes /sbin/init:
# ls -l /sbin/init
lrwxrwxrwx    1 root     root            14 Sep 19 22:25 /sbin/init -> ../bin/busybox

Busybox init will read /etc/inittab
# grep sysinit /etc/inittab
::sysinit:/etc/init.d/rcS

and execute /etc/init.d/rcS by default:
# ls -l /etc/init.d/rcS
lrwxrwxrwx    1 root     root             9 Sep 19 22:25 /etc/init.d/rcS -> tc-config
# ls -l /etc/init.d/tc-config
-rwxr-xr-x    1 root     root         15111 Aug 29 15:41 /etc/init.d/tc-config


Offline scfan

  • Newbie
  • *
  • Posts: 10
Re: TC inside chroot
« Reply #16 on: October 21, 2010, 05:45:28 PM »
Hi everyone,

Because of the help of everyone in the board, I'm 99% done. I have, however, a small problem.

I've used some development TCEs in order to compile software, which I would like to remove (and some other TCEs as well). However, and because of the nature of TC, this isn't as trivial as I thought.

Since appsaudit only marks the TCEs for removal, I need to reboot in order for them to be actually removed. Any tips or ideas on how to do this in a chroot environment?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TC inside chroot
« Reply #17 on: October 21, 2010, 06:02:08 PM »
just a raw thought...
what about exiting the chroot (umount everything which is mounted only for the chroot), then setting the chroot up again? No idea if this would work though...
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline scfan

  • Newbie
  • *
  • Posts: 10
Re: TC inside chroot
« Reply #18 on: October 21, 2010, 06:06:18 PM »
Hi there,

I don't think that will work, because from what I can tell shutdown.sh is needed in order to make something happen. If that script is not run, no changes will be made. Running the script by itself, though, won't do anything either.


Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: TC inside chroot
« Reply #19 on: October 21, 2010, 09:39:49 PM »
Maybe I'm thinking too simplistic here, but I'd remove entries from '.../tce/onboot.lst' and delete the respective .tcz files from '.../tce/optional' "by hand": e.g. via
    sed -i '/EXT.tcz/d' $( cat /opt/.tce_dir )/onboot.lst ; rm -f $( cat /opt/.tce_dir )/optional/EXT.tcz*
(for an extension named 'EXT.tcz')