WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dCore and Grub4DOS on a NTFS partition...  (Read 6472 times)

Offline sbaguz

  • Newbie
  • *
  • Posts: 42
dCore and Grub4DOS on a NTFS partition...
« on: July 27, 2016, 08:43:12 AM »
Dear all,

recently I managed to build a beautiful customized dCore system, I have spread it over several USB keys and PCs and finally I've been able to install grub4DOS on my company laptop without even touching the Windows MBR to have dCore always with me even at work...
Now the problem: the PC have a Windows 7 system installed on a NTFS partition.
This partition, where the tce folder reside, is mounted read-only during dCore boot and I can't use ntfs-3g afterwards to be able to save my changes while shutting down.
I have already tried the manual procedure (cat core.gz ntfs-3g.gz > mycore.gz) suggested in http://forum.tinycorelinux.net/index.php?topic=6246.0 without success (it seems the system doesn't load any extension).
Since I have no more time to try to port the script provided in that thread to dCore and even to well understand it (e.g.: the sed part is quite frightening...  :o ) do you have any suggestion/workaround to make me reach my goal?

Thanks in advance.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #1 on: July 27, 2016, 01:31:59 PM »
Though dCore supports *.gz initrd files as a part of a remaster in /tmp/builtin, remasters of the main initrd are a last resort to me as that inhibits keeping with updates.  If you have an ntfs-3g.gz, then you can place it the chosen /boot directory and specify it as another initrd in the boot loader, below is what I used with grub2 to have ntfs-3g available as if it were in the main dCore-*.gz image, and hopefully similar works with grub4dos:

Code: [Select]

insmod ext2
set root='(hd0,msdos7)'
linux /boot/vmlinuz-wily quiet max_loop=256 tce=sda7/tceimport-wily showapps user=jason nozswap desktop=startlxde
initrd  /boot/dCore-wily.gz /boot/ntfs-3g.gz


In fact, I a have created an sce2gz tool that is available as an extension that can create a *.gz out of an SCE in the SCE directory or one of one's choosing.  Works much like sce-load.  This is mainly to support ntfs-3g and perhaps wireless, but should work in any case.  Startup scripts in the extra *.gz are processed as usual and added to the list of installed packages.  It is assumed sce2gz is used to create the extra initrd's, convert raw Debian packages at your own risk. 

Please try booting with the extra initrd and let me know how it goes. 
« Last Edit: July 27, 2016, 01:34:42 PM by Jason W »

Offline sbaguz

  • Newbie
  • *
  • Posts: 42
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #2 on: July 28, 2016, 12:44:39 AM »
Hi Jason,

thanks for the quick answer.
Everything went fine... apparently.
I easily created the ntfs-3g.gz, I added it to the menu.lst of grub4dos (by the way: it works exactly like grub-legacy), the boot process gave no problems and the ntfs-3g package was up and running after the boot... but the NTFS disk was loaded read-only as before!
To be honest, I already had this problem even with the ntfs-3g.sce in sceboot.lst: I always had to manually load NTFS partitions when needed with the ntfs-3g command, but it was not so different from using the Mount Tool, so I was not so much worried about it. Now the situation is obviously different.
What do you suggest?
Another (probably stupid) question: since dCore should load everything in RAM, why I can't simply manually umount the partition where tce folder resides (the device is busy) and then mount it again with ntfs-3g command?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #3 on: July 28, 2016, 01:46:15 AM »
Extensions are loop mounted to /tmp/tcloop.
if a file  /etc/sysconfig/tcedir/copy2fs.flg  is present at boot time, everything is copied to RAM and the boot device can be un-mounted.
Download a copy and keep it handy: Core book ;)

Offline sbaguz

  • Newbie
  • *
  • Posts: 42
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #4 on: July 28, 2016, 02:09:10 AM »
Thanks for the hint Misalf: as said, it was a stupid question... now I understand, nevertheless I would like to avoid the Copy Mode, but I will consider it as the last resort if we weren't able to make ntfs-3g work as expected.  ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #5 on: July 28, 2016, 02:45:57 AM »
When you boot with your  ntfs-3g.gz , does  /etc/fstab  contain something like this?
Code: [Select]
/dev/sda1       /mnt/sda1       ntfs-3g  noauto,users,exec 0 0 # Added by TC
Download a copy and keep it handy: Core book ;)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #6 on: July 28, 2016, 03:17:42 AM »
/usr/sbin/rebuildfstab needed a bugfix for ntfs-3g.  Please try with the latest release candidate and it should be working.  Thanks.

Offline sbaguz

  • Newbie
  • *
  • Posts: 42
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #7 on: July 28, 2016, 03:56:16 AM »
@Misalf:
my fstab unfortunately shows a plain NTFS filesystem as expected, like this:
Code: [Select]
/dev/sda2       /mnt/sda2       ntfs     noauto,users,exec,ro,umask=000 0 0 # Added by TC
@Jason:
I'm sorry, but using the latest Release Candidate didn't solve the problem (actually the fstab above is taken while using it...).
I don't know if this could help, but I noticed that /usr/sbin/rebuildfstab is looking for ntfs-3g executable (or link) in /usr/sbin/ itself, but I have no ntfs-3g links here and the executable is in/bin/.
« Last Edit: July 28, 2016, 04:11:48 AM by sbaguz »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #8 on: July 28, 2016, 06:26:34 AM »
 copy2fs doesn't exist in dCore
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #9 on: July 28, 2016, 06:33:04 AM »
Ok, thanks, I will fix the ntfs-3g issue in rebuildfstab tonight.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #10 on: July 28, 2016, 06:49:04 AM »
If I understood well also mount tool needs the fix
dCore user

Offline sbaguz

  • Newbie
  • *
  • Posts: 42
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #11 on: July 28, 2016, 09:04:52 AM »
I suppose that solving the fstab problem will automatically solve also the problem of read-only mounting by Mount Tool...  ???

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #12 on: July 28, 2016, 06:35:15 PM »
New RC uploaded, hopefully this issue is fixed.

Offline sbaguz

  • Newbie
  • *
  • Posts: 42
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #13 on: July 29, 2016, 01:28:44 AM »
 :-\ Mmmmh, now there is some problem during boot: I get an error message, extensions are not loaded and I stay to a command line only...
The error message flashes too fast to let me read it: it's "can't stat something"...
It is maybe related to the Xprogs update you suggested? (By the way: how can I update it if I have no persistence? :o )

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: dCore and Grub4DOS on a NTFS partition...
« Reply #14 on: July 29, 2016, 02:18:49 AM »
Add the "pause" bootcode.
The only barriers that can stop you are the ones you create yourself.