LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-16-2008, 10:41 AM   #1
thethinker
Member
 
Registered: Jul 2006
Location: Peabody, MA, USA
Distribution: Xubuntu, Slackware, Pop!_OS
Posts: 297
Blog Entries: 2

Rep: Reputation: 37
Setting up External Hard Drive (USB) as a backup system on Slack 12.0


Hey everyone,
I recently got a USB external hard drive for use as a backup system. Now, I am using this hard drive as a backup for a windows computer as well. Basically all I can do right now is mount it (using mount /dev/sdb1 /mnt/tmp) and see the windows file system, but not write to it. So there are a few things I need to know how to do:

1) Make a linux partition (ext2 I suppose) on the harddrive that I can write to...is fdisk the way to go?

2) Make it so that when my computer boots up, if the hard drive is connected it automatically mounts (this is something in fstab obviously, but I know there is some kind of problem with naming sda1,sdb1, etc...how can I make sure the computer can find the linux partition every time? Is there a unique name somewhere I can use, or I've heard about "udev rules" as well...)

3) Some advice on permissions for this kind of process...ie if I am running backups every week or so, should I just keep the hard drive on root permissions, or maybe user-read only or something?

I don't need to many details, mostly just commands to use so I can start doing some web searching.

Thanks a bunch guys.
 
Old 12-16-2008, 10:57 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Rep: Reputation: 146Reputation: 146
http://reactivated.net/writing_udev_rules.html about persistent disk names, so that you can create /dev/exthd or whatever.
A sample line from my laptop:
Code:
# freecom external harddisk
BUS=="usb", KERNEL=="sd*", ATTRS{serial}=="152D20336012", NAME="%k", SYMLINK="freecom%n"
You don't necessarily need a Linux partition on the disk. NTFS or FAT32 are fine, too. For NTFS you will need ntfs-3g installed (take a slackbuild script from 12.1/12.2 or from http://www.slackbuilds.org .
You only have to look at "umask" to make the partition writable for you as normal user (if you want that).
 
Old 12-16-2008, 02:19 PM   #3
thethinker
Member
 
Registered: Jul 2006
Location: Peabody, MA, USA
Distribution: Xubuntu, Slackware, Pop!_OS
Posts: 297

Original Poster
Blog Entries: 2

Rep: Reputation: 37
ok cool thanks for the reply...I've got ntfs-3g on my system already, so that should be fine, but I tried to assign my hard drive a rule via udev and failed. I used

Code:
BUS=="usb", KERNEL=="sd*", ATTRS{size}=="976773168", NAME="%k", SYMLINK="exthd%n"
But here is the kind of link is creates:
Code:
# ls /dev/exthd*
/dev/exthd@
# file /dev/exthd
/dev/exthd: symbolic link to `sdb'
so it makes a link to sdb, not sdb1 or whatever. I know that sdb1 is what I want to try to mount, so how do I incorpoerate that into the rule? I figured the "%n" on the SYMLINK command would make that happen. Any ideas?
 
Old 12-16-2008, 02:24 PM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Rep: Reputation: 146Reputation: 146
Sorry, I'm clueless. It creates symbolic links here too, but also to the partition itself.

Code:
$ ls -alh /dev/freecom*
lrwxrwxrwx 1 root root 3 2008-12-16 21:22 /dev/freecom -> sdc
lrwxrwxrwx 1 root root 4 2008-12-16 21:22 /dev/freecom1 -> sdc1
Have you restarted udev? I guess so, else it wouldn't have picked up the rule anyway ...
 
Old 01-06-2009, 03:06 PM   #5
JazzItSelf
Member
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 44

Rep: Reputation: 18
I'm not sure if ntfs-3g has done this differently or not, but the windows implementation of NTFS has (or had) some issues regarding storing dates in UTC, but ignoring daylight savings. This could add or subtract an hour here or there... or something like that.

I don't know if that's still the case, I don't know if ntfs-3g does it that way or not, and I don't even know if that would be important to you! I've seen it cause issues for people in the past, so I figured I'd throw it out as a heads up.

--Cp
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file backup on rehat server to WD my book external usb hard drive justintime24 Linux - Server 2 05-09-2008 12:31 PM
usb external mini hard drive file system offbyte Linux - Hardware 1 11-04-2007 02:53 PM
How can I backup my FC5 system to a USB Hard Drive baldur2630 Linux - Newbie 3 04-02-2007 03:39 PM
Setting permissions on an external USB hard drive so that all users can read from it? Pi Man Linux - Hardware 2 09-07-2004 09:50 PM
Installing Slack 9.0 on an external USB hard drive Elohist Slackware 5 08-03-2004 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration