Linux is Driving Me Maaad

Associate
Joined
19 Oct 2002
Posts
1,940
Location
Maidenhead
Im trying to remove the 5% of reserved space from a NAS formatted drive and im going mental.

Ive been trying to copy tune2fs on to the nas via telnet by entering this: cp -r /mnt/ide1/public/tune2fs /sbin but it just says cp: unable to open '/sbin/tune2fs': Permission Denied :confused: Is this command wrong? How can i change the permissions on this folder?

Earlier i installed Ubuntu to VirtualBox in the hope that maybe i could format a hard drive with it .... but im figuring thats not possible? I dont suppose i can install Ubuntu on a partition after Windows can I?
 
(1) You can't write to sbin, probably because you're not root. Su to root and try again. Are you logged into your nas when you issue the cp command? I guess you've somehow how got your local desktop disk mounted as /mnt/ide1 on the nas?

(2) Ubuntu, I hear, plays quite well with Windows. You can even initiate the installer from windows, wubi.exe I believe it's called.
 
Yep, simple permissions issue for #1. Growse's suggestion of running su beforehand will resolve that.

As for #2, I'm not sure I follow what you were trying to do... it's been a long day. Did you install Ubuntu as a VM on the machine with the drive you want to format? You could always run a distro from a LiveCD or a USB stick, mount the drive you want to format and then do it that way.

Otherwise, to answer your question, you can't install Linux onto the same partition where Windows is installed - you'll need to create (at minimum) 2 new partitions to install Linux. Or use wubi to fake an installation of Ubuntu.
 
Wubi :p Like it, installing it now!

Yes i log into the nas as admin - i know absolutely nothing about linux, the closest ive been to stuff like this is back in the days of dos. But im finding the structure rather confusing with lots xrf---x and stuff, which ive read are the permissions.

This Super User command. Do i do it at login or once ive logged in? I dont actually what 'root' would be for this thing. The first drive in the nas is /mnt/ide1

If i can get tune2fs on it then hopefully i can simply run it from the nas and get rid of the 50gb worth of reserved space.

Cheers
 
When you run a command, run it with "sudo" before it, i.e.


sudo cp -r /mnt/ide1/public/tune2fs /home/bill/tune2fs

I wouldnt copy it to /sbin either.
 
Wubi :p Like it, installing it now!
Yes i log into the nas as admin - i know absolutely nothing about linux, the closest ive been to stuff like this is back in the days of dos. But im finding the structure rather confusing with lots xrf---x and stuff, which ive read are the permissions.

You are correct, this refers to the permissions of that object.

Do an:
ls -l

And you shoudl get results similar to this:
-rw-rw-r-- 1 USER_ID GROUP-ID 0 MONTH DAY TIME:TIME FILENAME

Note that there are 10 characters at the beginning in the sequence, lets break this down:

-rw-rw-r--

The first character '-', refers to the type of object. '-' means that this is a 'regular' file. This character could be many things including 'd' for directory.

The next 9 characters 'rw-rw-r--' refers to the permissions of that object. You can split those 9 characters into groups of 3 so:

OWNER GROUP OTHERS
rw- rw- r--

r = read
w = write
x = execute
- = none

So here, we can see that the owner of the file, in this case USER_ID, has read, write but no execute permissions on this object. The group owner of this file, in our case, GROUP_ID has read, write but no execute permissions on this object. OTHERS refers to anyone who is not the OWNER, a part of the GROUP that has ownership/permissions of this file, or root.

OTHERS have only read access to this file.

All of these permission options can be changed in various ways.

Have a look at the Linux/Unix manual page for chown for example:

So type:

man chown

Hope this kickstarts you into learning more about it :)

Any questions ask away,
 
Oooooer my head spinning, too hot to compute lol

Been trying alsorts like the su thing, then yesterday someone finally replied to my post on the MRT forum and it worked... almost:

Had some problems with his commands when using the public folder so moved tune2fs to the admin folder...

cd /mnt/ide1/admin/
chmod -R 777 /mnt/ide1/admin
./tune2fs

./tune2fs -m0 /dev/hda


When i get to the final command i get this error:

Bad magic number in super-block while trying to open /dev/hda
Couldn't find a valid filesystem superblock.

So i formatted another drive and started over, but i get the same error :confused:

Should be there though:
nasbxq.jpg
 
Last edited:
I would seem that i needed to add a '1' to 'hda' to make it work...

telnet.jpg


I assume the Reserved Block Count is what im looking at? But i still cannot use the missing 50gb for some reason :confused:
 
Sorry for the of topic, but what is that NAS GUI you have there?

You would need to add the 1 the the hda to make it work because the 1 is the partition you are working on. The hda bit only identifies the physical device. Tunefs is for the filesystem and needs to work on a partition (I'm a linux n00b, but I think that this is correct).

In Debian, it's easy to change the size of reserved space for root, though it seems not so easy for *buntu. I'll have a look myself and see if I can find out though.
 
Sorry for the of topic, but what is that NAS GUI you have there?

You would need to add the 1 the the hda to make it work because the 1 is the partition you are working on. The hda bit only identifies the physical device. Tunefs is for the filesystem and needs to work on a partition (I'm a linux n00b, but I think that this is correct).

In Debian, it's easy to change the size of reserved space for root, though it seems not so easy for *buntu. I'll have a look myself and see if I can find out though.
Ohhhhhh its for the partition ;) Thanks, that's good to know ... so seeing as there are 3 partitions on the system drive i would need to use hda2 as none of the other drives are big enough to reserve 50gb!!

Im not sure what the GUI is, it came with the thing. I'll see if i can find out
 
Ohhhhhh its for the partition ;) Thanks, that's good to know ... so seeing as there are 3 partitions on the system drive i would need to use hda2 as none of the other drives are big enough to reserve 50gb!!

Im not sure what the GUI is, it came with the thing. I'll see if i can find out

Ah hang on, sorry, misread your opening post. This is a dedicated NAS box running linux. I thought it was *buntu! I see. Don't worry about the GUI, no point in finding out.

Still, the tunefs info I gave you is correct.
 
Back
Top Bottom