-
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

HPE ProLiant MicroServer Gen10 Plus with Power Adapter
$599.00

HP ProLiant MicroServer Gen8 Tower Server Xeon E3-1220 v2 2.3GHz 16GB RAM
$289.99

HP Proliant MicroServer Gen 8 2.23GHz Xeon 16GB RAM NO SSD
$249.99

Supermicro E300-12C Mini 1U Barebone X12SCV-LVDS LGA1200 SNK-P0073A4 w/ Adapter
$225.00

New Barebones Supermicro 5019D Server, 4C/8T Xeon D-2123T, 1U Rackmountable, 10G
$449.99

Supermicro 510-2 U1 Rack Mount 3.30GHz 4-Core 4GB RAM No Drive No OS
$179.99

Supermicro SYS-6048R-E1CR36N 36B LFF 4U Server -V3- Choose CPUs/RAM - Wholesale
$4556.00

Supermicro SuperServer E300-15 - SYS-e300-9C - 16GB RAM 240GB Samsung SSD
$179.99

Supermicro 938-16 16-LFF MicroCloud SuperServer 5038MR-H8TRF *No Blade Servers*
$159.99

New Supermicro SuperServer E50-9AP-Wifi Mini PC Server
$175.00