WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to use a floppy as storage with tinycore  (Read 10045 times)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: how to use a floppy as storage with tinycore
« Reply #15 on: November 29, 2010, 06:46:54 PM »
I'd imagine that you'll need to run 'rebuildfstab' (as 'root') to get the "automatic" entry in '/etc/fstab'.

Otherwise you should be able to do something like mkdir /path/to/mountpoint && mount /dev/fd0 /path/to/mountpoint (again as 'root').

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #16 on: November 29, 2010, 08:27:44 PM »
hello maro,

here's part one of your advice.  it still looks like fd0 is labelled as noauto instead of automatic. 

root@box:~# fdformat /dev/fd0H1440
Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB
Formatting... done
Verifying... done
root@box:~# mkfs -t vfat -c /dev/fd0H1440
sh: mkfs: not found
root@box:~# mkfs -t vfat -c /dev/fd0H1440
sh: mkfs: not found
root@box:~# mkfs.vfat
mkfs.vfat 3.0.3 (18 May 2009)
No device specified!
Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]
       [-m boot-msg-file] [-n volume-name] [-i volume-id]
       [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]
       [-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]
       /dev/name [blocks]
root@box:~# mkfs.vfat /dev/fd0
mkfs.vfat 3.0.3 (18 May 2009)
root@box:~# mount /dev/fd0
mount: mounting /dev/fd0 on /mnt/fd0 failed: Invalid argument
root@box:~# rebuildfstab
root@box:~#
# /etc/fstab
proc            /proc        proc    defaults          0       0
sysfs           /sys         sysfs   defaults          0       0
devpts          /dev/pts     devpts  defaults          0       0
tmpfs           /dev/shm     tmpfs   defaults          0       0
/dev/ramzswap0  swap         swap    defaults,noauto   0       0
/dev/fd0        /mnt/fd0        auto     noauto,users,exec    0 0 # Added by TC
/dev/hda1       /mnt/hda1       ext3     noauto,users,exec,relatime 0 0 # Added
/dev/hda2       none            swap     defaults             0 0 # Added by TC
/dev/hdc        /mnt/hdc        auto     noauto,users,exec    0 0 # Added by TC
/dev/hdd        /mnt/hdd        auto     noauto,users,exec    0 0 # Added by TC
~                                                                             
~
~
- /etc/fstab 1/11 9%


can i respectfully say that part two is confusing me, and i'll try to explain how and why.

mkdir
i'm not confused by this

/path/to/mountpoint
i don't know where this would be.  do i just make up a directory?  i don't know what will work.  will /home work for this?  perhaps /home/floppy?

&&
these are double asperand's.  are they actually part of the command?  what are their purpose?

mount /dev/fd0 /path/to/mountpoint
if /home/floppy could work, this could be 'mount /dev/fd0 /home/floppy.
the whole command would be 'mkdir /home/floppy && mount /dev/fd0 /home/floppy'

i appreciate your expertise as always.
backup...backup...backup

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: how to use a floppy as storage with tinycore
« Reply #17 on: November 29, 2010, 08:58:43 PM »
cd /mnt
mount fd0

should work.
If not, then
mount -t vfat /dev/fd0 /mnt/fd0

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #18 on: November 29, 2010, 09:23:19 PM »
gerald_clark,

root@box:~# cd /mnt
root@box:/mnt# mount fd0
mount: mounting /dev/fd0 on /mnt/fd0 failed: Invalid argument
root@box:/mnt# mount -t vfat /dev/fd0 /mnt/fd0
root@box:/mnt#

it looks like no error messages, so the place for me to put a file (to test it), would be /mnt/fd0.
i'll give it a shot.  maybe i'll also try the floppy tool and the mount tool.  maybe even the dmesg command to see what i can learn.  this has been quite an experience.
thanks.
backup...backup...backup

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #19 on: November 29, 2010, 09:48:07 PM »
when i clicked on 'mount tool', fd0 was green. :D

here is what the floppy tool said:

fdformat: can't open '/dev/fd0H1440': Device or resource busy
mkdosfs 3.0.3 (18 May 2009)
/dev/fd0H1440: Device or resource busy

i haven't done anything else yet, just dropped in quick to let you know how it's going.
i'll see if i can't put files on, and take files off the floppy.

thanks.
backup...backup...backup

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: how to use a floppy as storage with tinycore
« Reply #20 on: November 29, 2010, 09:51:51 PM »
You have to umount before formating.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #21 on: November 29, 2010, 10:03:14 PM »
hello tinypoodle,

yeah, that was probably a factor as to why there were certain times when i could format, and other times when i couldn't.  i also have to be mindful of the 'lock' on the floppy.  you can't write to it in the 'lock' position.  i think that means formatting won't work when it's locked either.
thanks.
backup...backup...backup

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: how to use a floppy as storage with tinycore
« Reply #22 on: November 29, 2010, 10:11:29 PM »
hello tinypoodle,

yeah, that was probably a factor as to why there were certain times when i could format, and other times when i couldn't.  i also have to be mindful of the 'lock' on the floppy.  you can't write to it in the 'lock' position.  i think that means formatting won't work when it's locked either.
thanks.

Of course not   ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #23 on: November 29, 2010, 10:46:35 PM »
it worked (sort of).

i was able to copy a text file (a.txt) to the /mnt/fd0 with this command:

cp a.txt /mnt/fd0

i negotiate to the file and opened it to confirm.  i am able to write to the floppy, but i was not able to send the a.txt to the trash unless i used the terminal like this:

rm -i a.txt

when i tried to do it with xfe file manager gui, i get 'permission denied-can't write to file'

anyway, it's a permission issue (a lack of knowledge pertaining to permissions), but that will be for another thread.

thanks again to everyone who posted.   8)
backup...backup...backup

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #24 on: November 30, 2010, 03:14:03 PM »
additional info:

once mounted (a green button fd0 on mount tool), do this to unmount:
umount /mnt/fd0

and this to mount:
mount -t vfat /dev/fd0 /mnt/fd0
(thanks to gerald_clark for this)

the mount tool does not change color 'on the fly'.  the window has to be closed to change color.  when the window pops up it will be the new color providing everything was done correctly.
backup...backup...backup

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: how to use a floppy as storage with tinycore
« Reply #25 on: November 30, 2010, 03:22:54 PM »
additional info:

once mounted (a green button fd0 on mount tool), do this to unmount:
umount /mnt/fd0

and this to mount:
mount -t vfat /dev/fd0 /mnt/fd0
(thanks to gerald_clark for this)

the mount tool does not change color 'on the fly'.  the window has to be closed to change color.  when the window pops up it will be the new color providing everything was done correctly.

Alternatively, cycling through devices will update too, IME.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #26 on: November 30, 2010, 03:26:41 PM »
"Alternatively, cycling through devices will update too, IME."

thanks for the info, tinypoodle.
backup...backup...backup

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: how to use a floppy as storage with tinycore
« Reply #27 on: December 04, 2010, 12:14:02 AM »
after formatting with the tinycore floppy tool, i was unable to mount the floppy.  below are my efforts to make the floppy useable

tc@box:~$ fdformat /dev/fd0
Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB
Formatting... done
Verifying... done
tc@box:~$

tc@box:~$ mkfs.vfat /dev/fd0
sh: mkfs.vfat: not found
tc@box:~$ sudo mkfs.vfat /dev/fd0
sudo: mkfs.vfat: command not found

i decided to download the dosfstools-3
it worked to give the floppy a vfat file system
see below

tc@box:~$ sudo mkfs.vfat /dev/fd0
mkfs.vfat 3.0.3 (18 May 2009)
tc@box:~$

sudo su
to become root
mount -t vfat /dev/fd0 /mnt/fd0
to mount
umount /mnt/fd0
to unmount
backup...backup...backup

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: how to use a floppy as storage with tinycore
« Reply #28 on: December 04, 2010, 01:56:27 AM »
Testing here, as well using mnttool as a simple
Code: [Select]
mount /mnt/fd0
appear to work out of the box without any other requirements - neither  root privileges.

FWIW, testing done under 2.10 with an already formatted floppy (did not have any empty one at disposition).

EDIT:

After having done upper tests, it stroke me to test again with 'base norestore' and look, I could reproduce   :o

The only way I managed to mount was indeed with
Code: [Select]
sudo mount -t vfat /dev/fd0 /mnt/fd0

However, after mounting with upper command and umounting again once, then everything worked as expected and described earlier in this post.
« Last Edit: December 04, 2010, 03:18:51 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: how to use a floppy as storage with tinycore
« Reply #29 on: December 04, 2010, 04:38:00 AM »
Has to do with vfat being a module. On -t auto, the kernel only checks against known (loaded) file systems. When explicitly telling it it's vfat, then it checks if the module can be loaded.
The only barriers that can stop you are the ones you create yourself.