LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Problem with pendrive, i messed it up! (https://www.linuxquestions.org/questions/linux-hardware-18/problem-with-pendrive-i-messed-it-up-942950/)

DRAGSTER_TUNER 05-02-2012 11:37 AM

Problem with pendrive, i messed it up!
 
Hi guys,

I got i pen drive and i wish to put an debian live .iso on it. For this, i follow a tutorial, but it messed up erevything...

First of all, i put an .iso in my pendrive for see if it works...well, the system works and it boots from pendrive, but the debian image i used was for instalation, then, i downloaded a live .iso.

But while i was downloading it, i tryied another thing: i folow a tutorial and give this command:

cat debian.iso > /dev/sdX

where i sustitute debia.iso by Debian testing amd64 and /dev/sdx by /dev/sdd

But now everything goes wrong and it messed up all...

When i put an iso image on pendrive, it does not boot anymore, even the instalation image, that one was working...

Now, every time i insert this pendrive, that occurs:

1º two folders appears on Dolphin: Debian testing amd64 1 and another folder called SMI USB DISK.

2º The Debian folder access normal, but SMI USB DISK gimme an error that is something like that:

An error has occured acessing SMI USB DISK, the system returns: the driver of kernel form this file system is not available: error mounting /dev/sdd already mounted or /media/Debian testing amd64 1 busy

Now i need help!

I wish fix this to back the pendrive to the original status, i.e., mounting just one folder, and makes the .iso files i throw inside it works for boot.

Someone can help me?

ButterflyMelissa 05-02-2012 12:20 PM

Quote:

Someone can help me?
Maybe...
In a situation like this, I reformat the pendrive. I'd start the PC up with Knoppix (any other Live distro WILL do, dont worry), mount the pendrive and use fdisk to kill all partitions, then, I'd make one partition and format that to, say ext2 or ext3.

Make sure you know what you're doing!!!!!!!!!!!! I do that on a redundant PC (got choice of about ten more PC's here without having to use the main Box).
Format ONLY the pendrive, do NOT even mount the internal hard drive...

But, you know this by now... :)

Thor

onebuck 05-02-2012 12:36 PM

Member response
 
Hi,

Look at: Pendrivelinux <- 'Pendrivelinux provides simplified information to make it easy for anyone to install, boot, and run their favorite Gnu/Linux Distribution from a portable flash drive!

Following the above procedure you can boot and run Linux from a USB flash memory'.

DRAGSTER_TUNER 05-02-2012 04:00 PM

Thanx for replies until now...

one more quiestion: wich kind of command should i give to format the pendrive with fdisk?

onebuck 05-03-2012 06:42 AM

Member response
 
Hi,

Quote:

Originally Posted by DRAGSTER_TUNER (Post 4668825)
Thanx for replies until now...

one more quiestion: wich kind of command should i give to format the pendrive with fdisk?

From 'man fdisk';
Quote:

fdisk - Partition table manipulator for Linux Synopsis

fdisk [-uc] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device fdisk -l [-u] [device...]
fdisk -s partition...
fdisk -v
fdisk -h
Description

Hard disks can be divided into one or more logical disks called partitions. This division is described in the partition table found in sector 0 of the disk. In the BSD world one talks about 'disk slices' and a 'disklabel'.
Linux needs at least one partition, namely for its root file system. It can use swap files and/or swap partitions, but the latter are more efficient. So, usually one will want a second Linux partition dedicated as swap partition. On Intel compatible hardware, the BIOS that boots the system can often only access the first 1024 cylinders of the disk. For this reason people with large disks often create a third partition, just a few MB large, typically mounted on /boot, to store the kernel image and a few auxiliary files needed at boot time, so as to make sure that this stuff is accessible to the BIOS. There may be reasons of security, ease of administration and backup, or testing, to use more than the minimum number of partitions.
From 'man mkfs';
Quote:

mkfs - build a Linux file system
Synopsis
mkfs [-V] [-t fstype] [fs-options] filesys [blocks]

Description
mkfs is used to build a Linux file system on a device, usually a hard disk partition. filesys is either the device name (e.g. /dev/hda1, /dev/sdb2), or a regular file that shall contain the file system. blocks is the number of blocks to be used for the file system. The exit code returned by mkfs is 0 on success and 1 on failure.
In actuality, mkfs is simply a front-end for the various file system builders (mkfs.fstype) available under Linux. The file system-specific builder is searched for in a number of directories like perhaps /sbin, /sbin/fs, /sbin/fs.d, /etc/fs, /etc (the precise list is defined at compile time but at least contains /sbin and /sbin/fs), and finally in the directories listed in the PATH environment variable. Please see the file system-specific builder manual pages for further details.
I do suggest that you read the 'man command' pages for each of the above commands. You can look a; The Linux Tutorial 'Linux Knowledge Base and Tutorial' & UNIX Tutorial for Beginners 'Guide to Unix & Linux OS'

Short story would be to first partition the pendrive using fdisk, cfdisk or sfdisk. Then use 'mkfs' for formatting the pendrive. Realize that 'mkfs' is the front end for making a filesystem. If you want a 'ext2/3/4' then the command would be either; 'mkfs.ext2', 'mkfs.ext3' or 'mkfs.ext4'. Be sure to look at the available options/switches for each of the commands.

Look at: Restoring your USB Key which is a good procedure for Windows or Gnu/Linux.

You can get utilities for setting up flash that can handle the actions for you. Look at 'Gparted' which is a valuable tool to have and use for your maintenance needs. List of tools for Gnu/Linux.

Just a few links to aid you to gaining some understanding;



1 Linux Documentation Project
2 Rute Tutorial & Exposition
3 Linux Command Guide
4 Bash Beginners Guide
5 Bash Reference Manual
6 Advanced Bash-Scripting Guide
7 Linux Newbie Admin Guide
8 LinuxSelfHelp
9 Utimate Linux Newbie Guide
10 Linux Home Networking
11 Virtualization- Top 10

The above links and others can be found at 'Slackware-Links'. More than just Slackware® links!

HTH!


All times are GMT -5. The time now is 04:06 AM.