-
Senior Member
registered user

Originally Posted by
unclecameron
ok, I have done this, and it ALMOST works
Code:
#!/bin/bash
#find the "# Added by KNOPPIX" line
grep -A 1 "KNOPPIX" /etc/fstab | grep dev | cut -c1-9 > drivelist
# read a line at a time
cat drivelist | while read line;
do
# increment a variable for sequential mount points
let "a += 1"
# make mountpoint
mkdir -p "/scanmount/drive"$a
# now mount that drive
mount ${line} /scanmount/drive$a
done
the problem is knoppix needs a filesystem type, so now I have to get it to search the same file/line for the characters between the 2nd and 3rd blank space on the same line...
I wonder if there's simpler way to just get Knoppix to automount them, rather than listing noauto in fstab?
There probably is, this may work, automount every first and second partition, I've only shown sata drives but you'll get the idea.
#!/bin/bash
mkdir /mnt/winxp
mkdir /mnt/winxp2
mount -rw /dev/sda1 /mnt/winxp -t ntfs 2 > /dev/null
mount -rw /dev/sda2 /mnt/winxp -t ntfs 2 > /dev/null
You would have to install ntfs-3g to have read write permissions and extend the script
If the partition does not exist standard error is just redirected to /dev/null
You could even add it as a startup script to your run level and include it in
/etc/rc5.d/ or whatever runlevel youre starting at.
Similar Threads
-
By luka in forum Hardware & Booting
Replies: 2
Last Post: 07-23-2008, 03:48 PM
-
By A. Jorge Garcia in forum General Support
Replies: 10
Last Post: 02-28-2006, 11:13 PM
-
By cfish in forum Hdd Install / Debian / Apt
Replies: 6
Last Post: 03-26-2005, 02:04 AM
-
By mahdi in forum General Support
Replies: 3
Last Post: 04-18-2004, 07:50 PM
-
By audioaficionado in forum Customising & Remastering
Replies: 0
Last Post: 03-29-2003, 06:50 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Seagate ST6000NM0115 6TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$159.99

Seagate Exos X14 10TB 7200RPM 3.5" SAS 12Gb/s Hard Drive HDD ST10000NM0528
$165.00

Seagate 14TB Exos X14 7200RPM SATA 6Gb/s 256MB 3.5" Enterprise HDD ST14000NM0408
$354.99

Western Digital WD30EFRX 3TB SATA 5400RPM 3.5" Internal NASware HDD Hard Drive
$84.69

HGST 4TB 7200RPM 3.5" SATA 6Gb/s Internal HDD | HDN724040ALE640 0F22408
$75.00

HGST - 6TB - 7200RPM 3.5" SATA 6Gb/s Enterprise Hard Drive | HUS726060ALA640
$84.99

HGST HUS724040ALA640 4TB 7200 RPM SATA 3.5" Internal Desktop Drive 100% Health
$78.00

Seagate ST500DM009 BarraCuda 500 GB 3.5" SATA III Desktop Hard Drive
$14.99

(ST8000NM0045) SEAGATE ENTERPRISE 8TB 7200RPM 4Kn SATA 6Gb/s 3.5" HARD DRIVE
$199.99

1PCS Seagate IronWolf ST3000VN007 3TB 5900RPM SATA 6Gb/s 3.5 NAS Internal Hard
$87.67