WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: boot from ntfs  (Read 15166 times)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: boot from ntfs
« Reply #15 on: January 27, 2015, 09:43:03 AM »
Not sure if this is still valid for TC 6 but might be helpful:
http://yalis.fr/cms/index.php/post/2013/05/12/NTFS-and-modular-boot-for-TinyCore-Linux
Download a copy and keep it handy: Core book ;)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: boot from ntfs
« Reply #16 on: January 27, 2015, 10:16:36 AM »
I boot from ntfs on my laptop.
I used ezremaster and included ntfs-3g.tcz and ntfsprogs.tcz.

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: boot from ntfs
« Reply #17 on: January 27, 2015, 10:39:32 AM »
@misalf thanks for the link to that script.  It looks like the only parts that I didn't do that are in there are the symlinks in the /usr/local/tce.installed directory and I didn't run the command:

sudo sed -i 's/\$(blkid \$1)/$(blkid $1|sed s@TYPE=\\"ntfs\\"@TYPE=\\"ntfs-3g\\"@g)/' usr/sbin/fstype

Instead I added the /usr/local/sbin/mount.ntfs and mount.ntfs-3g symlinks (which do the same thing I think).

@gerald_clark what steps does ezremaster take to add an extension into a remastered image?  Here's my steps:

mkdir /tmp/extract
cd /tmp/extract
zcat /tmp/corepure64.gz | sudo cpio -i -H newc -d
mount -t squashfs -o loop /tmp/ntfs-3g.tcz /mnt/source
cp -R /mnt/source/* ./
(repeated the above two steps for fuse.tcz; I also created the /usr/local/sbin/mount.ntfs[-3g] symlinks)
ldconfig -r /tmp/extract
rm ../corepure64.gz; sudo find | sudo cpio -o -H newc | gzip -2 > ../corepure64.gz

Also, does your remastered image still allow the loading of extensions from a specified 'optional' directory on the ntfs partition?

Thanks,
Dave
« Last Edit: January 27, 2015, 10:54:14 AM by wysiwyg »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: boot from ntfs
« Reply #18 on: January 27, 2015, 10:54:09 AM »

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: boot from ntfs
« Reply #19 on: January 27, 2015, 11:10:38 AM »
You did not do the depmod.

http://wiki.tinycorelinux.net/wiki:remastering

I didn't run it because I didn't add any kernel modules (ntfs-3g seems to be a user space program).  However, I ran the following two lines before repackaging:

sudo chroot /tmp/extract depmod -a 3.16.6-tinycore64
sudo ldconfig -r /tmp/extract

After rebooting, nothing has changed.  The Windows partition is still getting mounted once I've reached the cli, but no extensions are being loaded from that partition.

Would I need to add the symlinks in the /usr/local/tce.installed directory?  Also, all the files that were added under /usr/local have root:root ownership.  Would that cause any problems?

Thanks,
Dave

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: boot from ntfs
« Reply #20 on: January 27, 2015, 11:20:24 AM »
I was also avoiding the ezremaster tool because it seemed difficult to use if I recall correctly.  At this point, I would just like to have a working system so I looked through the wiki on the remaster tool and it says to download the 'ezremaster' extension.  Unfortunately it doesn't appear to be available in the 5.x or 6.x repos for x86_64.  Seems like I'm back to the forums for help.

Dave

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: boot from ntfs
« Reply #21 on: January 27, 2015, 11:39:08 AM »
Scripts in  /usr/local/tce.installed  won't get executed if not contained in an extension.

Quote
Instead I added the /usr/local/sbin/mount.ntfs and mount.ntfs-3g symlinks (which do the same thing I think).
Do you also have  /usr/local/sbin/mount.lowntfs-3g  symlinked to  /usr/local/bin/lowntfs-3g ?
Not sure if it's needed in your case though, but..
Download a copy and keep it handy: Core book ;)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: boot from ntfs
« Reply #22 on: January 27, 2015, 11:52:55 AM »
@Misalf the contents of /usr/local/tce.installed are:

-rwxr-xr-x 1 root root   241 Jan 24 21:53 fuse
-rwxr-xr-x 1 root root   205 Jan 24 17:40 ntfs-3g
-rwxr-xr-x 1 root root   455 Jan 27 11:33 udev-extra

I added the symlink to the lowntfs-3g binary, rebooted, but still no mounting of the extensions...  Any other thoughts?

Would there be a way I can add some debug information during the boot cycle?  Something like showing what is mounted before the "Loading extensions..." call during the boot process?  Something has to be up with this...

Thanks,
Dave
« Last Edit: January 27, 2015, 11:54:33 AM by wysiwyg »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: boot from ntfs
« Reply #23 on: January 27, 2015, 12:09:45 PM »
If you have extracted those extensions into the filesystem (core.gz), tce.installed scripts won't get executed. If you place the extensions in  /tmp/tce/builtin  (also in core.gz - take good care about permissions if doing this manually - also needs an additional /tmp/tce/onboot.lst file IIRC), tce.installed scripts will get executed and create proper symlinks or whatever they are supposed to do. I should stop suggesting thing now, though. Has been a while since I tryed this.

The  syslog  boot code gives lots of messages that you can read after boot in  /var/log/ (messages?).
The  loglevel=x  boot code might give some info while booting.
Download a copy and keep it handy: Core book ;)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: boot from ntfs
« Reply #24 on: January 27, 2015, 12:14:12 PM »
@Misalf I was just about to post the following information, but you beat me to it!

It looks like the files in the /usr/local/tce.installed directory are just scripts that should/are executed at some point (boot perhaps).  It looks like the one for ntfs-3g is just supposed to create /sbin/mount.ntfs-3g and lowntfs-3g symlinks.  It appears that these are not getting created during the boot cycle.  Is this indicating another problem somewhere?


@gerald_clark when you boot up from your ntfs partition and run a 'which mount.ntfs', what is getting returned?  I created these symlinks in the /usr/local/sbin directory.  Both are in the $PATH, but I don't know if this may be causing problems.

Dave

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: boot from ntfs
« Reply #25 on: January 27, 2015, 12:32:54 PM »
The thing is, after all extensions have been loaded at boot, only those who were actually listed in the onboot.lst file (and the respective dependencies) will be checked for containing a start script in  /usr/local/tce.installed . For extensions that have been manually extracted into core.gz, this check will not be done.

When creating symlinks manually before remastering (because the start script can't create them), make sure you're in the correct directory. Otherwise, after booting your remastered initrd, the symlinks might point to  /tmp/extractet/usr/... .

Unfortunately, I can't reproduce what I have done (I have ntfs-3g added to my more.gz with correct symlinks). I keep trying.

I thought I did something like this:
Code: [Select]
/tmp/more/usr/local/bin/$ sudo ln -s ntfs-3g ../sbin/mount.ntfs-3g
« Last Edit: January 27, 2015, 12:36:17 PM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: boot from ntfs
« Reply #26 on: January 27, 2015, 12:45:37 PM »
Maybe I did
Code: [Select]
/tmp/more/usr/local/bin/$ sudo ln -s /usr/local/bin/ntfs-3g ../sbin/mount.ntfs-3g

My links work properly and I was actually able to install TC 5.x 32-bit on a friends 64-bit laptop with no problem (I didn't even installed a boot loader to the MBR; just added grubldr from Grub4DOS and a menu.lst file and the booting just worked automagically).
Download a copy and keep it handy: Core book ;)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: boot from ntfs
« Reply #27 on: January 27, 2015, 01:03:14 PM »
That's exactly what I did:

cd /usr/local/sbin
ln -s ../bin/ntfs-3g mount.ntfs-3g
ln -s ../bin/ntfs-3g mount.ntfs
ln -s ../bin/lowntfs-3g mount.lowntfs-3g

So these files are stored in the /usr/local/sbin directory.  The ntfs-3g tce.installed script creates them in /bin.  As stated, both of these directories are in the path so either location should work just fine.  From any directory I can execute "mount.ntfs --help" and I get the ntfs-3g help page for the binary so I know the symlinks are correct.  Running 'which mount.ntfs' returns '/usr/local/sbin/mount.ntfs', so that's correct.  Plus the Windows partition is mounted r/w when I check it after a bootup.  Everything appears to work as designed, its just that the extensions aren't being loaded for some reason.

Dave

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11623
Re: boot from ntfs
« Reply #28 on: January 27, 2015, 01:20:06 PM »

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: boot from ntfs
« Reply #29 on: January 27, 2015, 02:22:33 PM »
Hi wysiwyg
Maybe try this:
http://forum.tinycorelinux.net/index.php/topic,13113.msg72330.html#msg72330


So I tried:

cat corepure64.gz fuse.tcz ntfs-3g.tcz > corepure64-test.gz

After rebooting, there are several error messages with the final one saying it is going to reboot in 60 seconds.  So it appears that does not work... Thanks for the attempt though Rich.  Any other thoughts?

Dave