WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: NTFS not mounting as rw on boot  (Read 756 times)

Offline Ares

  • WikiUser
  • *
  • Posts: 5
NTFS not mounting as rw on boot
« on: February 19, 2020, 09:33:20 PM »
Hello everybody!

I am running microcore from a ntfs partition on a usb drive. I added tce boot code to enable persistence in that same ntfs partition, but the partition is mounted as read-only.

After reading some of the posts in the forum, I created ntfs-3g.gz (dynamic remaster) that contained:

  • /mnt/builtin/optional/ntfs-3g.tcz
  • /mnt/builtin/onboot.lst

I also added a startup script to ntfs-3g.tcz (/usr/local/tce-installed/ntfs-3g) that executes rebuildfstab, but it seems that the startup scripts are run late in tce-setup, when the drive has been already mounted (in function process_normal_tcedir).

Any ideas?

Thanks!

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8223
Re: NTFS not mounting as rw on boot
« Reply #1 on: February 19, 2020, 09:50:41 PM »
Hi Ares
... After reading some of the posts in the forum, I created ntfs-3g.gz (dynamic remaster) ...
Did you read this one:
http://forum.tinycorelinux.net/index.php/topic,19399.0.html

Offline Ares

  • WikiUser
  • *
  • Posts: 5
Re: NTFS not mounting as rw on boot
« Reply #2 on: February 19, 2020, 10:05:12 PM »
Hi Rich,

Yes, I read that one (actually, l lost track on how many related posts I read  ;D) but it seems that what Lee mentioned does not apply anymore, or so it seems:

Quote
However, if you use ntfs3g.gz (a secondary initrd) or remaster ntfs3g into core.gz, then ntfs3g will be present before the partition containing the tce directory is mounted.

ntfs-3g.gz (secondary init) indeed loads ntfs-3g, but it is not used to mount the ntfs partitions.

I can dismount and mount as read-write manually, but I would prefer it to be done automatically during boot.


Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8223
Re: NTFS not mounting as rw on boot
« Reply #3 on: February 19, 2020, 10:25:52 PM »
Hi Ares
The first script shown here looks like it will do what you are looking for:
http://yalis.fr/cms/index.php/post/2013/05/12/NTFS-and-modular-boot-for-TinyCore-Linux
I personally have not tried it. I run Linux on EXT file systems.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8223
Re: NTFS not mounting as rw on boot
« Reply #4 on: February 19, 2020, 10:47:40 PM »
Hi Ares
Something like this might work:
Code: [Select]
tce-load -w squashfs-tools
tce-load -i squashfs-tools
wget http://tinycorelinux.net/10.x/x86/tcz/ntfs-3g.tcz
unsquashfs ntfs-3g.tcz
cd squashfs-root
sudo find | sudo cpio -o -H newc | gzip -2 > ../ntfs-3g.gz
cd ../
wget http://tinycorelinux.net/10.x/x86/release/distribution_files/core.gz
cat core.gz ntfs-3g.gz > core-ntfs-3g.gz

Offline Ares

  • WikiUser
  • *
  • Posts: 5
Re: NTFS not mounting as rw on boot
« Reply #5 on: February 20, 2020, 09:24:18 AM »
It worked!!

I did as you described in the your last post (with a minor change, I switched to 11.x release) and it worked flawlessly. Then, I repeated same steps, but this time I did not merge core.gz with ntfs-3g-gz. Instead I used both gz files as initrd in Grub2 and it also worked:

Code: [Select]
initrd /TC/core.gz /TC/ntfs-3g.gz
My mistake was trying to pack ntfs-3g.tcz inside ntfs-3g.gz, instead of repacking ntfs-3g.tcz as ntfs-3g.gz. I read so many posts and tried so many things that now I feel a bit dumb for not seeing such an easy solution. Anyway, it was not wasted time. On the contrary, it was a great crash course into the possibilities of this amazing little tool.

Many thanks to you, Rich, and to developers and the community that make Tiny Core possible!


Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8223
Re: NTFS not mounting as rw on boot
« Reply #6 on: February 20, 2020, 10:03:10 AM »
Hi Ares
It worked!! ...
Thank you for confirming it worked.

Quote
I read so many posts and tried so many things that now I feel a bit dumb for not seeing such an easy solution.
The various steps can seem overwhelming if you are not familiar with the process. This is especially true it the writeup assumes
prior knowledge by the reader or is just not concise.