Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: mbertrand on April 12, 2013, 08:02:04 AM
-
I know that TC is scanning and updating fstab?
My fstab is in my .xfiletool.lst because I've added a line for usb stick.
My question is: what exactly is TC doing to update fstab. I have two drive and I can see that my second drive is always there and is configured to not be automatically mounted. This is correct?
What would happen if I would add a line manually for that drive and do backup? How would TC handle that?
Or maybe it may easier if someone would just explain in a nutshell the logic. I'm kind of new to Linux and sometimes a challenge for me to understand the code in the scripts.
Thanks for your time.
-
/etc/fstab is not saved. It is rebuilt at each boot.
If you want another drive mounted at boot, add a mount command to /opt/bootlocal.sh.
-
I have fstab in my list of files to backup beacause I added something releated to usb.
I'm going to try to explain this properly. I have two drives sda, sdb. sda1 being the bootable one.
after boot fstab contains the sdb1 configured as no auto mount and this all good. The problem is that it is configured to mount as
ext2 when it should be ext4. Now, if I go to the mount tool and mount it the fstab file gets updated(this is did not know) and now contains ext4 wich is good. So what is going on you think?
Also, because my fstab is in my xfiles.lst and I do backup the changes are persistent is this because the fstab is generated/updated before restore is done
-
If you want to keep a static fstab, in addition to backing it up, you need to use the "nofstab" bootcode.
But it's not clear what you want here - to automount the second drive?
-
The way TinyCore is doing by default is what I want but it does not seem to be detecting the right partition type for sdb1.
This what I'm doing. In bootlocal at some point I explicitly mount sdb1 using this syntax: mount moutpoint. I think using mount command this way is using fstab info (generated by TC) but fstab is ext2 when it should be ext4.
NOw for testing purpases I tried mounting sdb1 using TC mouting tool from control panel and it was able to mount it and it modified the fstab from ext2 to ext4
-
Hi mbertrand
I believe mnttool might call rebuildfstab when it starts up. Try adding a rebuildfstab call to your bootlocal just prior
to the mount command and see if that makes any difference.
-
I'll try that but I would like to know why it thinks it should be mounted as ext2 and not ext4. What is used to determine what format it should be mounted as?
-
Read the rebuildfstab script. You will see that it uses blkid to determine the file system type.
Also, since you put fstab in .xfiletool.lst it will NOT be backed up.
-
Read the rebuildfstab script. You will see that it uses blkid to determine the file system type.
Also, since you put fstab in .xfiletool.lst it will NOT be backed up.
Sorry typo I put it in .filetool.lst.
-
Hi mbertrand
Although it's possible, I find it hard to believe that the file system type would be misidentified upon boot up. I would
find it easier to believe that your backing up and restoring fstab is the cause of the problem. Fstab is not a static file.
It gets rebuilt every time a USB drive is plugged and unplugged.
-
I guess fstab gets restored after it is generated?
-
Hi mbertrand
Yes.
-
Ok all has been solved and I deserve a kick in the as*. Thanks for all your help.
-
Hi mbertrand
... I deserve a kick in the as*.
That won't be necessary, though, I do think you should go stand in the corner and think about what you have done. ;D
-
I'm back!! Is there a condition where after restoring fstab that the fstab is rebuilt.
I have fstab in my .files.lst. And Ive notices a few time now that after rebooting I don't have my changes. Some times it's there
and sometimes it is not.
-
fstab is rebuilt whenever you plug in a new block device.
Other programs may also call rebuildfstab.
-
Is there a condition where after restoring fstab that the fstab is rebuilt.
I have fstab in my .files.lst. And Ive notices a few time now that after rebooting I don't have my changes. Some times it's there
and sometimes it is not.
Is that with "nofstab" boot code or without?