Shallow Thoughts
Akkana's Musings on Open Source, Science, and Nature.
Sat, 01 Apr 2006
When I plug in my camera (or flash card reader) to upload photos,
they always upload as executable. I knew there must be an easy
way to fix it, and finally got around to it.
I'm sure you are fully capable of reading man pages and figuring this
out, just like I was. (Hint: the solution is in man mount.)
But wouldn't you rather have it just spoon-fed to you?
(I know I would have.) So here it is:
you need the fmask option to mount.
It's a mask, so you set it to the bits you
don't want set when you mount the filesystem
(on top of your normal umask).
My /etc/fstab entry for my camera or other flash card device
now looks like this:
/dev/sda1 /pix vfat rw,user,fmask=111,noauto 0 0
(On the laptop it's sdb1 because the built-in memory stick reader
always grabs sda.)
Tags: linux, filesystems
[
21:39 Apr 01, 2006
More linux |
permalink to this entry
]
Wed, 08 Dec 2004
I ran out of space on the backup drive today (must replace that 40G
with a newer, bigger disk!) and decided I wanted to consolidate the
last two partitions into one. The filesystem (ext2) was on sda3,
and sda4 was blank.
Supposedly parted and qtparted can resize a filesystem,
but when I select the relevant partition in qtparted (delete sda4,
then select sda3) and tell it to resize, it gives an error message:
No Implementation: This ext2 filesystem has a rather strange layout! Parted can't resize this (yet).
I ended up using cfdisk to resize the partition, then resize2fs
to grow the filesystem.
Since there doesn't seem to be a howto on resizing filesystems,
here are the steps:
- cfdisk /dev/sda
- Select hda4 and delete it.
- Select hda3 and delete it. (Partitioning programs like fdisk
and cfdisk don't have "resize", they only have delete and recreate.)
- Create a new partition, using all the available space.
- Write and quit.
- resize2fs -p /dev/sda3
(there's also a resize_reiserfs). This required that I run fsck
first (even though the filesystem had been unmounted cleanly).
It's possible that that was why qtparted failed to resize, but
if so, it should have said so.
Tags: linux, filesystems
[
16:58 Dec 08, 2004
More linux |
permalink to this entry
]