WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Fixed: small bug in tc-funktions -> find_mountpoint() regarding tcvd loopback  (Read 1611 times)

Offline jspanier

  • WikiUser
  • *
  • Posts: 2
I was playing with persistent /home, /opt AND tce all combined in a tcvd loopback file (i.e. tcvd=tc.img tce=tvcd home=tcvd opt=tcvd). I want to do that, because it allows me to boot TC on bare metal OR in QEMU on Win (with tc.img as virtual harddrive) without any changes and still have all my extensions, setting and files in place. This is a very easy process and I will write a wiki entry about it when the issue is fixed.

But unfortunately the tcvd option is slightly broken since at least Core 3.8.4 (did not check in earlier releases). That bug results in /home and /opt being mounted from the loopback file correctly, but only by chance. BUT /mnt/tcvd is not mounted and thus tce in loopback is NOT POSSIBLE.

I traced the issue to the handling of find_mountpoint("tcvd") in tc_functions. The function invariably returns MOUNTPOINT=/mnt/tcvd and MOUNTED="no", regardless of the actual content of /etc/mtab. This is caused by an <if> that is checking if $D2 is set to "tcvd" but that is never the case, because it gets set to "/dev/tcvd" a few lines before.

Here is a very easy patch that fixes that issue.
« Last Edit: January 13, 2012, 02:39:46 AM by jspanier »

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Verified and accepted. Will be in 4.3rc1. Thanks.
10+ Years Contributing to Linux Open Source Projects.