LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2010, 12:47 PM   #1
Megabitfl
LQ Newbie
 
Registered: Apr 2010
Location: Florida
Distribution: Debian 5
Posts: 3

Rep: Reputation: Disabled
Hard drive Permissions issue


Hi all,
we are using an application on a 'Live CD' which is doing some of what we need but we want to add additional applications to it. I moved it to a hard drive and tested that it worked properly, then I put that hard drive in an existing Debian 5 pc as the second hard drive. The problem is that the hard drive thinks it's a CD and is read only.
On my development system I have 1 Debian hard drive , the test hard drive drive and 1 floppy, no CDrom.

The fstab shows:
# <filesystem> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0

/dev/hda1 - normal mount (ext3)
/dev/hda5 - normal mount (swap)

/dev/hdc /media/cdrom0 UDF,iso9660 user, noauto 0 0

/dev/fd0 - normal mount

So, how can I make the hard drive hdc stop thinking it's a cdrom so I can add the additional applications?

Any help would be appreciated.

Megabit in FL
 
Old 04-13-2010, 01:22 PM   #2
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
Quote:
Originally Posted by Megabitfl View Post
Hi all,
we are using an application on a 'Live CD' which is doing some of what we need but we want to add additional applications to it. I moved it to a hard drive and tested that it worked properly, then I put that hard drive in an existing Debian 5 pc as the second hard drive. The problem is that the hard drive thinks it's a CD and is read only.
What application is this that you are using? Is it something you wrote yourself? Or is it something you got off the internet or the Debian repos? If the app is publicly available, could you provide a link to it?
And how did you copy this application to the second hard drive?

So what is on this second hard drive? Just this one application and nothing else on the entire hard drive? Is there any data on it or anything?
I don't think I have ever seen a hard drive mounted as a cdrom drive before. Is this an internal or external hard drive connected via a usb cable?
Here is the fstab entry for my data drive (my second hard drive) on my Slackware system:
Code:
/dev/sdb5        /data            ext3        defaults,noatime         1   2
Something like that would be what you would expect for a second hard drive on a linux system.
(Note: Normally, a second hard drive on a linux system would /dev/hdb, or /dev/sdb. /dev/hdc would be used for the third hard drive, etc.
Note #2: Just in case you are wondering, the reason my data drive has only the logical partition /dev/sdb5 in my fstab is because /dev/sdb1 is a primary partition that I just do not have set to automount on my system. If I did want to automount it, I would just add:
Code:
/dev/sdb1        /data            ext3        defaults,noatime         1   2
to my fstab. Or if I formatted it to ext4, I would just change the ext3 to ext4 in fstab.
Hope this helps.

And welcome to the LQ forums!

Last edited by tommcd; 04-13-2010 at 01:26 PM.
 
Old 04-13-2010, 01:32 PM   #3
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,172

Rep: Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526
A second hard drive will be hdb, not hdc. hdc is your cdrom. fstab is not automatically updated if you add a disk. You have to edit the /etc/fstab file and add what you want.

Run the command 'df' wihtout quotes in a terminal, and it should show up there, once the partition(s) are mounted.

The command that mounts the second drive partitions controls it the partitions are read only or read/write.

To mount a new partition, on a second IDE hard drive, first make a mount point. A mount point is nothing but an empty directory. Pick a standard location such as /mnt. As root, in a konsole, cd /mnt then, 'mkdir newdrive'. That will create an empty directory at /mnt/newdrive. Now issue a mount command. 'mount -t filesystem_type /dev/hdb1 /mnt/newdrive' should do it. ( You have to change the word filesystem_type to the type of file system you have. See man mount for all supported file systems.

If you get no output from the mount, it worked. Navigate to /mnt/newdrive and do a 'ls' to show your files...
 
Old 04-13-2010, 02:33 PM   #4
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
Quote:
Originally Posted by camorri View Post
A second hard drive will be hdb, not hdc. hdc is your cdrom. fstab is not automatically updated if you add a disk. You have to edit the /etc/fstab file and add what you want.
This is what I thought also. But consider that in his first post Megabitfl (the OP) stated that:
Quote:
On my development system I have 1 Debian hard drive , the test hard drive drive and 1 floppy, no CDrom.
Megabitfl,
Just to clear this up, the system that you are asking about, the system that runs Debian 5 with the 2 hard drives, does it or does it not contain a cdrom drive?
I thought that your system was without a cdrom from your first post. But you obviously are using 2 systems here. Am I correct?
The first system ran the "liveCD" and the second system contains the second hard drive in question that you want add to your fstab. And this system is without a cdrom drive. Am I correct so far?
Sorry if I sound overly anal here. I just want to make sure everyone knows what you are working with so we can give you the best possible advice.
 
Old 04-13-2010, 03:26 PM   #5
Megabitfl
LQ Newbie
 
Registered: Apr 2010
Location: Florida
Distribution: Debian 5
Posts: 3

Original Poster
Rep: Reputation: Disabled
Folks,
Thanks for the ideas but they don't work yet. Here is a bit of back ground.

The application is GNU GPL compliant (?), it was given to me as an img.gz on a flash drive. I had an unused pc with a 60 gig hd in it so I booted from a Linux Boot CD then #gunzip -c application.img.gz > /dev/hda. This put the image on the hard drive and rewrote the partitions, hda1, hda2, and hda3.

I then removed the hard drive and put it into my Debian 5 pc as the second hard drive. My thoughts were I would have root permission. I disconnected the cdrom so it wouldn't be a factor. Now I boot Debian and the /etc/fstab is as follows:

# <filesystem> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 errors=remount - ro 0 1
/dev/hda5 none swap sw 0 0

/dev/hdc /media/cdrom0 UDF,iso9660 user, noauto 0 0

/dev/fd0 /media/floppt0 auto rw,user,noauto 0 0

The second hard drive identifies as a cdrom hdc.

I tried to mount hdc as ext3 and it wouldn't let me.
#mount -t ext3 /dev/hdc /mnt/testdrive

I next mounted hdc1 as ext3 successfully
then hdc3 mounted successfully also.

hdc 2 proved to the problem
#mount -t ext3/dev/hdc2 /mnt/testdrive2 would not mount it said wrong fs type.

I then tried
#mount -t iso9660 /dev/hdc2 /mnt/testdrive2 which worked

Now I can get to 2 of the partitions but the other one still eludes me, the system thinks it is a cdrom. So is there any way to change the system't thinking so I can write and change things?



Sorry for the length, verbose mode works well, I'm still having problems with terse mode.

Megabit in FL
 
Old 04-13-2010, 04:53 PM   #6
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
Quote:
Originally Posted by Megabitfl View Post
The application is GNU GPL compliant (?), it was given to me as an img.gz on a flash drive. I had an unused pc with a 60 gig hd in it so I booted from a Linux Boot CD then #gunzip -c application.img.gz > /dev/hda. This put the image on the hard drive and rewrote the partitions, hda1, hda2, and hda3.
So, once again, does this application have a name?? Every GPL licensed application should at least have a name. If it is indeed licensed under GPL, then the source code should be freely available from somewhere. In order to be GPL compliant, the source code for the application must be available for anyone who wants it. It must also be possible for anyone to modify this source code. And it must also be possible for anyone to redistribute this modified source code in any way the user wants to. ...
So doe this mystery app have a name?? And what exactly does it do??? Can you answer these questions please????
Quote:
Originally Posted by Megabitfl View Post
I then removed the hard drive and put it into my Debian 5 pc as the second hard drive. My thoughts were I would have root permission. I disconnected the cdrom so it wouldn't be a factor.
Why would it be necessary to to disconnect the cdrom drive in order to mount the second hard drive? This should not be necessary.
Quote:
Originally Posted by Megabitfl View Post
I tried to mount hdc as ext3 and it wouldn't let me.
#mount -t ext3 /dev/hdc /mnt/testdrive

I next mounted hdc1 as ext3 successfully
then hdc3 mounted successfully also.
You can not mount an entire hard drive. You must mount a partition on the hard drive. This is why mounting /dev/hdc1 and /dev/hdc3 worked, and why trying to mount /dev/hdc did not.
Quote:
Originally Posted by Megabitfl View Post
hdc 2 proved to the problem
#mount -t ext3/dev/hdc2 /mnt/testdrive2 would not mount it said wrong fs type.

I then tried
#mount -t iso9660 /dev/hdc2 /mnt/testdrive2 which worked

Now I can get to 2 of the partitions but the other one still eludes me, the system thinks it is a cdrom.
From the terminal, as root, post the output of:
Code:
# fdisk -l
This will list all the partitions on your system, whether they are mounted or not.

Last edited by tommcd; 04-15-2010 at 06:41 AM.
 
Old 04-14-2010, 11:25 AM   #7
Megabitfl
LQ Newbie
 
Registered: Apr 2010
Location: Florida
Distribution: Debian 5
Posts: 3

Original Poster
Rep: Reputation: Disabled
TommCD,
I thought I had given the name earlier, my goof, I am working with Zeroshell using it's captive portal feature. We want to add some remote maintenance and drop a couple of cookies on the users. The CDrom was removed because I used it's cable and power to plug in the second hard drive.

The fdisk -l requested

debian:~# fdisk -l

Disk /dev/hda: 20.5 GB, 20547841536 bytes
255 heads, 63 sectors/track, 2498 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001d13a

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2405 19318131 83 Linux
/dev/hda2 2406 2498 747022+ 5 Extended
/dev/hda5 2406 2498 746991 82 Linux swap / Solaris

Disk /dev/hdc: 60.0 GB, 60022480896 bytes
32 heads, 61 sectors/track, 60057 cylinders
Units = cylinders of 1952 * 512 = 999424 bytes
Disk identifier: 0x59eb2af7

Device Boot Start End Blocks Id System
/dev/hdc1 1 14 13633+ 83 Linux
/dev/hdc2 15 175 157136 83 Linux
/dev/hdc3 176 1015 819840 83 Linux
debian:~#


There may an easier way to accomplish this, our Linux "guru' moved on to greener pastures, I worked with UNIX 20 years ago so I got this project.

Megabit in FL
 
Old 04-15-2010, 06:52 AM   #8
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
Quote:
Originally Posted by Megabitfl View Post
There may an easier way to accomplish this, our Linux "guru' moved on to greener pastures, I worked with UNIX 20 years ago so I got this project.
I don't know why you can not mount /dev/hdc2. For that matter, I don't know why your second hard drive would be /dev/hdc instead of /dev/hdb.
Is there anything on /dev/hdc2? The easiest way around this would be to format /dev/hdc2 with cfdisk, GParted, or a Parted Magic live CD. Then you should be able to mount it without problems.
What did you use to partition the second hard drive in the first place?
 
Old 04-15-2010, 08:41 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,343

Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
IDE drive IDs are fixed i.e.
hda - first controller master
hdb - first controller slave
hdc - 2nd controller master
hdd - 2nd controller slave

The fstab file the OP posted indicated that the cdrom was connect to the 2nd controller master and since the 2nd hard drive is connected to the same cables it will also be recognized as hdc. BTW the output of fdisk does not indicate if a filesystem is mounted. The file is a entire drive image and therefore what ever partitions it contains will be the same on the drive when copied. I am not familiar with zeroshell but it is based on a live CD and the 2nd partition might indeed be a iso9660 filesystem. There is some information on the zeroshell's website on howto build packages from source but may not help with what you are trying to accomplish. What zeroshell image file did you copy?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Hard Drive Permissions yusuo Mandriva 5 05-16-2007 08:34 AM
CD-rw drive permissions issue. mitchell7man Ubuntu 21 04-17-2007 05:16 PM
Hard Drive Permissions djljjm Linux - Newbie 2 04-22-2005 03:00 PM
Hard Drive Permissions djljjm Linux - Newbie 3 04-18-2005 04:35 PM
Permissions for second hard drive digi691 Linux - Newbie 29 09-03-2004 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:57 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration