Damn small linux hard drive

DSL Tips and Tricks :: HowTo mount your hard drive in DSL LiveCD

UPDATE. Thanks to Doobit, AwPhuch and cbagger01 who offered three simpler solutions than mine, my post I see is a long way away from being the best method. (I feel like a real newbie for overlooking the obvious and instead searching for needles in the haystack.) Simply put if you want a graphical solution, use EmelFM > find the /mnt/hda1 folder or what ever other device folder you want to mount, right click and select mount. Simple and easy without any command line commands. or use the mount.app applet in the application dock called ‘Slit’ on the bottom right of the enhanced desktop, use the arrows to navigate all the mount points and simply mount/unmount by clicking on the mount button with the bolt symbol (green when mounted, black when unmounted) If you are not on the enhanced desktop, simply right click on the desktop > apps > tools > mount.app or alternatively select run command and type:

Code Sample
mount.app

P.S. If you double click on the mount.app icon for each mounted drive, the Midnight Commander file manager opens, and if you want to read a mount.app FAQ run the following command:

Code Sample
mount.conf -H

If you prefer a command line mount solution, alternatively, in Xterm, type as any user the following simple command:

Code Sample
mount /mnt/hda1

and voila! It mounts your hard disk as read and write, or read only if it is a WinXP/2000 NTFS file system formatted drive. For more details, read the rest of my post . but as I said these three solutions seem easier. 🙂 Thanks guys. Now if this can only be added to newbie documentation.!

After initially having problems mounting my hard drive in the DSL LiveCD and finding almost no useful help in the forum or in the DSL Documentation Project, I thought I would post this
HOWTO or rather HOWIDUNNIT. 🙂 (PS: Warning! I have not tested this on a WindowsNT or WindowsXP NTFS file system, and I would imagine that DSL LiveCD may not have the tools to do that safely, so beware if you try mounting Windows drives that are not vfat type formated! NTFS is very tricky to work with in Linux!)

The DSL LiveCD installer’s Knoppix autoconfiguration did a good job of detecting both of my hard drives: one with Windows on it, and one with both Windows partitions and Linux partitions.

Unfortunately when I mounted them I kept getting ‘permission denied’ messages when I tried to access them as the damnsmall user. (NB: Mounting for newbies is the linux term for adding another file system to the already existing single file system that linux creates on startup.)

The problem I faced initially was that the default damnsmall user does not have permissions to mount other file systems, and when I initially mounted my hard drives as the root user, the damnsmall user still could not view them since it lacked permission by default to access root-owned files.

So having described the problems I faced, let’s describe the method that worked for me — that is how to get the root user to mount my hard disks in such a way that the damnsmall defaul user could both read and write to them! 🙂

1) Use either a) Xterm or b) EmelFM file manager if you want a graphic window, or c) just the simple bash shell (e.g ctrl-alt-f1, NB: ctrl-alt-f2 returns you to the xwindows graphical desktop).

Читайте также:  Linux вывести только колонку

2) Next look to see what hard drive partitions were found when the DSL LiveCD was loaded by typing the following command line:

Code Sample
cat /etc/fstab

into any of our command line interfaces.
You will see a list of all known drive partitions on your computer.

This is what mine looked like:
proc /proc proc defaults 0 0 pts
/dev/pts devpts mode=0622 0 0
/dev/fd0 /mnt/auto/floppy auto user,noauto,exec,umask=000 0 0
/dev/cdrom /mnt/auto/cdrom auto user,noauto,exec,ro 0 0
# Added by KNOPPIX
/dev/hdc1 /mnt/hdc1 vfat noauto,users,exec,umask=000,uid=1001,gid=500 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 vfat noauto,users,exec,umask=000,uid=1001,gid=500 0 0
# Added by KNOPPIX
/dev/hda5 /mnt/hda5 ext2 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 reiserfs noauto,users,exec 0 0

It found two hard drives: hda and hdc
(hda is the first hard drive on my first IDE strip
while hdc is the first hard drive on my second IDE strip)
In addition it found four hard disk partitions on my hda
hard disk: hda1 (windows type vfat), hda5 (linux type ext2)
hda6 (linux type swap), and hda7 (linux type reiserfs, a journalled file system). (NB: if you also want to see which devices are currently mounted into your linux filesystem, type at the command line prompt:

Code Sample
cat /etc/mtab

which shows you your mount table of mounted devices.)

(NB: at a minimum DSL LiveCD should have found one hard drive with one partition hda, if there is any hard drive at all in your computer.)

3) To mount a hard drive partition (meaning to merge it with the currently running linux file system), you will have to enter some command lines as the root user to mount your hard drives and to be able for all users to view and use files on that hard drive. (NB: This is not difficult for Newbies, as long as they type carefully and exactly as instructed, including any blank spaces or lack of blank spaces).

— that means to become the root user, if you use Xterm or a
bash shell you will need to type

Code Sample
sudo su

to switch to the root user (NB:If you are going to work as a root user it is highly recommended to set your password for security purposes by typing

Code Sample
passwd root

and then entering a 5 to 8 letter password when prompted).
— if you are using EmelFM you just type

Code Sample
sudo

on the same line preceding any command you want to execute as root user (i.e.

Code Sample
sudo pwd

,
to view the present working directory as viewed by the root user, probably /ramdisk/home/damnsmall ). ‘sudo’, I believe, means ‘superuser do’ which grants root privelages temporarily to another user.

4) HERE IS THE IMPORTANT PART:

To mount my ‘hda1’ windows drive, I typed the following
into the Xterm root prompt, as a root user (see above):

Code Sample
mount /dev/hda1 /mnt/hda1 -o umask=000

The command reads: a) mount the hda1 device to the folder named ‘/mnt/hda1’ (i.e. the hda1 folder, found in the mnt folder, found in the root directory, which is sort of like the c:\ drive in Windows) b) with the ‘-o’ option named umask=000 (NB: that is three zeros not three letter Os) which is the critical option that allows all users access to the files on the hard drive. (NB: Without the umask=000 option all other users except root will get «permission denied» error messages when they try to access the files on the newly mounted hard disk.)

If you are using the command line provided in EmelFM, the graphical file system manager on your DSL desktop, then you would type instead in the damnsmall@box textbox the command prefaced with ‘sudo’:

Читайте также:  Intel battery management device windows 10 x86
Code Sample
sudo mount /dev/hda1 /mnt/hda1 -o umask=000

There it’s now done!
The hard drive is mounted as readable and writable.
Now you just have to view it.

5) VIEWING your hard drive.

In Xterm or bash, to list the files, type:

Code Sample
ls /mnt/hda1

(or whatever folder you mounted it to).
Of course this only lists in a command line view the files.

If you prefer a graphical file browser like explorer then use the EmelFM which is found as an icon on the enhanced DSL desktop or in the apps > tools menu if you right click on the desktop. Just click on the UpDir(ectory) icon until you reach the root directory that contains a folder named ‘mnt’ then click on the ‘mnt’ folder and again on the ‘hda1’ folder (if that was where you mounted your hard drive) and you will see all your files. You can copy, move, delete, etc. to your heart’s content. (Hint: to create an empty file named test.txt type at the command prompt

Code Sample
touch test.txt

)
🙂

6) As some final hints, you might want to create a folder in your damnsmall user’s folder as a place to mount your hard drive’s files instead of the default locations in the ‘mnt’ folder that were created on startup (Hint: try the list command

Code Sample
ls /mnt

). In Xterm for example when you typed

Code Sample
sudo su

to change to the root user you were placed by default in the /ramdisk/home/damnsmall folder.
To create a new folder here type (or in EmelFM if that is what you are using):

Code Sample
mkdir hda1

(or what ever name you want to give it)
This will make a directory named ‘hda1’ in the damnsmall folder.

Then to mount your drive here, type:

Code Sample
mount /dev/hda1 ./hda1 -o umask=000

(for Xterm) or

Code Sample
sudo /mount /dev/hda1 ./hda1 -o umask=000

(for EmelFM)
The ‘./hda1’ mount location will default to the newly created directory.
To list the files, type:

Code Sample
ls ./hda1

or navigate to the folder with the mouse in the graphical EmelFM interface.

Another option that you might want to add to your mount command if you are afraid of doing some damage to your files on your window drive is the ‘ro’ option which means ‘read only’ By default the drives are mounted ‘rw’ meaning read write. You might accidently modify them if they are ‘writable’. To only view and read the files, for security purposes, use the ‘ro’ option instead by typing:

Code Sample
mount /dev/hda1 /mnt/hda1 -o ro,umask=000

(if in Xterm) or

Code Sample
sudo mount /dev/hda1 /mnt/hda1 -o ro,umask=000

(if EmelFM).

Have fun! Doublezz
Sorry about the long post but I want to be helpful to newbies too. Awesome post man!

However the mount tab on the fluxbox slit on the right of the window does it for you.

Hit the little arror. until you see the dev you want to mount..hit the little key

P.S. Shell method is much more cooler though heh

Brian
AwPhuch Thanks for the post! I have had no trouble mounting hard drives with a sudo su /mnt/hda1 command, but unmounting them can be a problem. In jwm, you don’t have slit, but Emelfm mounts and unmounts just fine, most of the time.
NTFS can not be written to by DSL, though it can see the file names. DSL has no problem with FAT and in fact, my Windows partitions have become little more than extra storage space these days. You can safely mount NTFS partitions.

Читайте также:  Linux не открывает страницы

They will be mounted as «read only» and you can get or view files on them with no problems.

However, you will not be able to save or modify files on the NTFS partitions.

Because they are mounted as «read-only» permission, you do not need to worry about breaking anything while you are mounted to these partitions. Oh yeah,

You should be able to mount partitions as user DSL as long as you do not specify the full mount command and the mounting information is listed inside the /etc/fstab file. In other words:

will work just fine, while

mount -t vfat /dev/hda1 /mnt/hda1

will choke unless you are user «root» or some other user that has the permission to do this. Next Page.
original here.

Источник

Installing to the Hard Disk

From DSL Wiki

Steps of installing DSL to a harddisk are as follows:

1) Boot up the DSL livecd. If your computer does not support booting from CDROM drive, then download the boot floppy image from the DSL website and get the RAWRITE32.exe program and create a boot floppy disk. Then use the boot floppy + liveCD to start up DSL.

2) Open up an xterminal window (click on the A:Terminal icon or right-click on the desktop and choose a terminal) and type:

Assuming that you are ready to blow away all of your existing data storage (you might want to back up any special drivers and other important stuff in case you want to re-install the original OS), create 2 new partitions:

  • hda1 Linux Swap Type 82 Size (at least 128mb)
  • hda2 Linux Type 83 Size (the rest of the disk space, I recommend at least 2gb). Flag this partition as bootable.

Before you leave cfdisk, write the changes to the partition table with the Write option. If your hard disk is really big, try leaving some unpartitioned space for future use.

  • Your DSL installation will go to partition hda2.
  • Your DSL swap partition will be hda1.

3) Next, you will need to reboot your system, again with the DSL livecd .

5) Then follow the hd install script. The FAQ is at http://www.damnsmalllinux.org/dsl-hd-install.html) Your system will need to reboot again. Remove the CD, and this time boot to the hard drive and continue following the instructions.

Note: There have been many reported problems with networking disappearing after installing DSL 3.2.

Note: If you are attempting to install to a hard drive from within VMWare, you need to define your hard drive as an IDE, NOT the recommended SCSI.

Installing DSL to a Harddisk (another way)

1) Boot from the DSL LiveCD

2) At the boot prompt type «install»

3) Select option #1 to create a boot floppy (the installation script would only finish without errors if the boot floppy was available, even when installing from CD)

4) Select option #10 to partition your hard disk as described above.

5) Run the hard drive install option (with the boot floppy inserted)

6) The install will ask if you want to use Lilo or Grub as a boot loader after it finishes copying the DSL files.

Hard Drive Installation Walkthroughs

You can read about the experience of others at these walkthrough pages. If you have information on a hard drive installation please add it to the wiki with Category ‘Specific Systems’, and consider adding a link to the appropriate installation page (hard drive, usb, frugal, etc.)

Источник

Оцените статью