Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
running linux mint 8, I am incapable of repairing my Usb after it has became read only. I have tried using the gparted to repair, but what steps would i have to do after i delete the old partition and the file system is "allocated"
I tried to go to devices> create partition table and click create.
after that i go to create new partition, change the filesystem to fat32, then attempt to add it, i get a error at
Create new Fat32 File system
>mkdosfs -f32 -v -n "" /dev/sdc1
mkdosfs: unable to open /dev/sdc1
The package that creates a dos filesystem is dosfstools, first check whether it is installed. I haven't used mint but I believe it's not too far removed from debian/ubuntu, so if you can't get on with the graphical user interface (gui) then you might be able to get it from commandline thus:
Code:
apt-cache policy dosfstools
to check whether you have it then if not
Code:
sudo apt-get install dosfstools
I guess from your post that you are using gui mostly? Note use of sudo to get you admin privilege if that is the case, required for system change but not for package search.
Then insert your device and unmount it. If you can't do that from gui post again.
I guess it will have a device node /dev/sdb? Several ways to check, simplest is
Code:
dmesg | tail
which will show you what has just happened.
Then try:
Code:
sudo mkfs.vfat /dev/sdb
or whatever device node has been assigned.
Note that I am guessing the commands are like ubuntu, the main point is that admin needs privileges gained by switching to root user (not automatically provided in ubuntu therefore probably same in mint) or prefacing the command with sudo. Many problems in linux are nothing more than privileges issues. Regards
Last edited by sonichedgehog; 01-02-2010 at 05:07 AM.
Reason: error in recommended code
which is probably right! Anyway, my code was slightly wrong- the device node is sd(something, b,c, etc, depending on what has been detected first) but there is a partition, in your case sdc1. So you would need to enter sdc1 not sdc. Actually dmesg | tail didn't include your device, it must have been plugged in earlier. Dmesg without tail will show a longer event history.
As an alternative you could clear the device and make a new partition using parted. To test this, I have just deleted all partitions on an old spare usb stick and created a new partition with type fat16 (fat32 u/s for this ancient disk). I used parted for this. If you need further help please post again.
I think it's safe to make the USB act like a super floppy:
Code:
dd if=/dev/zero of=/dev/sdc # optional if you want to make sure if all parts of your USB is still writable
mkdosfs -f32 -v -n "" -i 0 -I /dev/sdc # -i is optional
Please make sure that /dev/sdc really points to your usb drive or else you might erase the wrong drive. Do 'dmesg | tail' OR 'dmesg | grep sdc'.
Last edited by konsolebox; 01-03-2010 at 07:29 AM.
it seems like permission denied is my main error.... along with the fact that it cannot open the filesystem that it is trying to create, which seems like they are both the same problem.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
Rep:
Quote:
Originally Posted by cdarrah010
i tried dd if=/dev/zero of=/dev/sdc and i got this
it seems like permission denied is my main error.... along with the fact that it cannot open the filesystem that it is trying to create, which seems like they are both the same problem.
I assume that there is nothing on the device that you need to backup or you would have done so. To test whether you have any control over what is on the device, you could overwrite with random data by
Code:
sudo shred -n1 /dev/sdc
although if unable to dd anything to it it sounds as though there may be a permission issue as has been said. If you have problems with getting root privilege (unlikely as you have been using sudo?) please post.
Again as has been mentioned you need to be sure that you are taking out the right device- if one of your hd's/partitions is unmounted the various mkfs,dd, shred etc commands will destroy the data on it.
it seems like permission denied is my main error....
Probably but we're not sure about that yet. Denial of permission does not imply write access error or IO error. As suggested, try to do it as a super user. Also try to watch the output of dmesg if it shows errors related to the device. Still, 'dmesg | tail'.
now the device is unable to mount afer plugging it back into the laptop... lol
the eroor is this
Quote:
Error mounting: mount exited with exit code 32: mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
so after doing dmesg | tail i got
Quote:
cody@somemachine ~ $ dmesg | tail
[ 2321.186314] ath9k: timeout (100000 us) on reg 0x806c: 0xdeadbeef & 0x01f00000 != 0x00000000
[ 2321.186486] ath9k: RX failed to go idle in 10 ms RXSM=0xdeadbeef
[ 2441.183243] ath9k: timeout (100000 us) on reg 0x806c: 0xdeadbeef & 0x01f00000 != 0x00000000
[ 2441.183414] ath9k: RX failed to go idle in 10 ms RXSM=0xdeadbeef
[ 2497.921936] ath9k: timeout (100000 us) on reg 0x806c: 0xdeadbeef & 0x01f00000 != 0x00000000
[ 2497.922106] ath9k: RX failed to go idle in 10 ms RXSM=0xdeadbeef
[ 2670.197815] FAT: invalid media value (0x2b)
[ 2670.197836] VFS: Can't find a valid FAT filesystem on dev sdc1.
[ 2681.475312] FAT: invalid media value (0x2b)
[ 2681.475333] VFS: Can't find a valid FAT filesystem on dev sdc1.
which to my newbie eyes appears to be the result of no fat system??? and yes i have been using sudo
Why is it that it's trying to search sdc1 and not sdc? On my system that does not happen even if HAL is active.
Where you able to properly format the device using mkdosfs and were there no errors found? You might actually ran 'dd if=/dev/zero of=/dev/sdc'... But you might still have tried to create a filesystem in /dev/sdc1. Even though you already erased tables in /dev/sdc, /dev/sdc1 will not disappear until you plug it again to the system. AFAIK the kernel does not automatically update the tables until the device is reloaded.
At this stage it doesn't matter whether the device is mounted on connection. When it has a valid filesystem, it can easily be mounted manually, but that's for later.
I used the following on my spare disk, adjusted for your case. This would require a cleared device, which
Code:
sudo shred -n1 /dev/sdc
would achieve irrespective of what is on it at present:
Translate: make a new primary partition on sdc, of fat32 type, start at the beginning of the device, end at 8gB (either how big you want the partition, or the limit of the usbstick).
After this, my device automounted when next plugged in.
welll i think i fixed my harddrive, i plugged into a microsoft 7 computer and it reformatted it automatically. bad news though. i completely mashed my linux hard drive, as in i cannot find it anywhere on my external harddrive. apparently closing the terminal when it is executing a process will delete any and all files you have...
Your other thread http://www.linuxquestions.org/questi...t-boot-779940/ indicated that you are running Mint7 from usb hard drive- is this the one that is giving you trouble? I don't want to go off topic here and I guess i am somewhat breaching etiquette by crossing info from different threads but it seems the best way to help. AFAIK grub can be configured to look anywhere on your system for your kernel,including a removable device. If you are trying to boot a Lx device from W$ laptop, AFAIK this must be either a live CD, live USB (with BIOS altered to loom for it first before booting from HD) or you have to install GRUB which modifies the MBR code so that w$ will sit alongside other options. I mention this because you need to make clear what end result you require from your USB device, as it may be that you are carrying out tasks that are slightly outside the scope of this thread.
The only incidence I know where an operation destroys data if hung is a defrag (w$) or a partition resize/move (parted, gparted). However I think a w$ os would not perceive an ext file system as data so might reformat a device that contained nothing else. This would not harm the hardware.
If W$ can write to your device than linux can. Please decide what you need, you can build a linux OS on either of your laptops, with dual boot on the W$ one, or if you prefer on your removable HD, from your Linux laptop; but the installation will change the MBR to look for grub.lst on your removable HD so you will need to run GRUB from the existing OS on the laptop to restore its independence.
We can help you with any of these steps, but I believe that grub editing is difficult until you have more experience with linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.