LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   want to mount,rw but dont know /dev id - (https://www.linuxquestions.org/questions/linux-newbie-8/want-to-mount-rw-but-dont-know-dev-id-761370/)

shred_eng 10-12-2009 09:49 AM

want to mount,rw but dont know /dev id -
 
hi, ive almost got my system how i want it, but i changed something in fstab now lots of stuff are broken because filesystem is read only :D

its ubuntu server and is console only but i do use winscp to do a lot of stuff to it.(including messing it up)

i was trying to get quota to work properly and shifted the commands from the /dev that i thought was the root partition but i think is actually the boot partition. so when i re-entered it into this /dev, i missed out a parameter and now im stuck.


# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/mapper/server-root during installation
UUID=7e36ae4e-24e3-40ce-b013-093f07bf67f8 / ext3 relatime,errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv 0 1
# /boot was on /dev/sdb5 during installation
UUID=8d913e1a-1e9c-4a93-9e4a-e24e6ea57010 /boot ext2 relatime 0 2
# swap was on /dev/mapper/server-swap_1 during installation
UUID=74162569-d40c-4b09-be68-625621f26b1e none swap sw 0 0
/dev/sda5 none swap sw 0 0
/dev/scd1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd0 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
#/dev/sdb5 / ext3 defaults,errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 1

see the 0 on the end of this jqfmt=vfsv0 ^

that isnt present on the ext3 filesystem (where i moved it to)

look above st the entry : /dev/mapper/server-root during installation

the last line commented out is where i guessed the root partition was, but is probably boot.

why are the devices only a load of numbers??

i think i need a proper /dev/ name like /dev/sdb3 or something, to mount it properly.

hope this all makes sense, i need to delete the stuff i added and all should be well apart from quota.

john,

kilgoretrout 10-12-2009 11:23 AM

As root run:

# fdisk -l

That will list all the partitions by device file that your system recognizes, whether mounted or not.

If your target partition is still not clear, run:

# blkid -s UUID

That will print out all the recognized partitions by device file and their corresponding UUIDs.

shred_eng 10-12-2009 02:10 PM

i tried those commands and got this:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5100 40965718+ 7 HPFS/NTFS
/dev/sda2 5101 9902 38572065 7 HPFS/NTFS
/dev/sda3 9903 14946 40515930 f W95 Ext'd (LBA)
/dev/sda5 9903 9963 489919+ 82 Linux swap / Solaris
/dev/sda6 9964 14946 40025916 7 HPFS/NTFS


Device Boot Start End Blocks Id System
/dev/sdb1 1 1185 9518481 8e Linux LVM
/dev/sdb2 1186 1216 249007+ 5 Extended
/dev/sdb5 1186 1216 248976 83 Linux


john@server:~$ sudo blkid -s UUID
/dev/sda1: UUID="2010676210673DC2"
/dev/sda2: UUID="0228E6A028E691C9"
/dev/sda6: UUID="1E3434EE3434CA93"
/dev/sdb1: UUID="e9ZQAV-7SkY-38hM-thCL-Avee-erej-SyoK7R"
/dev/sdb5: UUID="8d913e1a-1e9c-4a93-9e4a-e24e6ea57010"
/dev/mapper/server-root: UUID="7e36ae4e-24e3-40ce-b013-093f07bf67f8"
/dev/mapper/server-swap_1: UUID="74162569-d40c-4b09-be68-625621f26b1e"

seems to me its probably /dev/sdb2 but terminal returned this:

mount: can't find /dev/sdb2 in /etc/fstab or /etc/mtab

when i typed sudo mount -no remount,rw /dev/sb2

the swap is definitely on /dev/sda5

any ideas what to do next?

thanx,

shred_eng 10-12-2009 03:08 PM

hi, ive managed to mount rw, with:

mount -o rw,remount /dev/sdb2 /

so panic over.

thanks kilgoretrout,

john,

kilgoretrout 10-12-2009 06:45 PM

I'm not sure what you did, but from that fdisk output, sdb2 is definitely not the right partition. sdb2 is an extended partition that acts as a container for logical partitions, in particular, sdb5 which is probably the partition you are looking for.

Hard drives can have at most, 4 primary partitions. A hack was devised long ago to get around this 4 partition limit. One primary partition can be used as a container for any number of logical partitions within it. In linux the primary partitions are always numbered 1 to 4 and the first logical partition is numbered 5. You can't mount a primary partition that is acting as a container for logical partitions AFAIK.

In your case sda3 and sdb2 are both primary partitions acting as containers, i.e. they are extended partitions. sdb2 contains sdb5 and sda3 contains sda5 and sda6.

shred_eng 10-16-2009 06:17 AM

hi, your right,that never solved my problem because every time i rebooted it was read only again.so i put everything back the way it was in fstab and it works fine again. ive abandoned trying to get quota to work

but if i change this, (copied from my first post)

UUID=7e36ae4e-24e3-40ce-b013-093f07bf67f8 / ext3 relatime,errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv 0 1

to this,

/dev/sdb5 / ext3 relatime,errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 1

do you think it would work properly and load up rw, with quota working?

of course i could just try, but maybe someone could tell me the correct way to get quota working and change that weird entry in fstab to something more managable.

i have aquota.user and aquota.group in root /

thanks,


All times are GMT -5. The time now is 08:12 AM.