PDA

View Full Version : linux commands?


Xinos
12 Oct 2006, 13:10
Due to the horriblly evil Windows Update my windows is now unbootable.

I am running ubunthu live atm, and I want to get at my harddrives. However in the dev folder when I try to access them it says: Couln't display "/dev/hdb"

I had a knowledgable friend help me a long time ago with this, but he isn't on msn. How do I mount my disks / make them accessable?

evilworm2
12 Oct 2006, 13:16
Due to the horriblly evil Windows Update my windows is now unbootable.

:o

I am running ubunthu live atm, and I want to get at my harddrives. However in the dev folder when I try to access them it says: Couln't display "/dev/hdb"

Ubuntu tricks - how to mount your Windows partition and make it read/writable (http://www.arsgeek.com/?p=585)

Hope this helps.

EDIT: Oh wait, this is not for the Live CD... you have to reboot. :(

Ok, then lets begin from zero:

Can you paste the output of the 'mount' command and the contents of '/etc/fstab'?

Xinos
12 Oct 2006, 13:37
ubuntu@dhcppc1:~$ mount
/dev/mapper/casper-snapshot on / type auto (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
/dev on /.dev type unknown (rw,bind)
none on /dev type tmpfs (rw,size=5M,mode=0755)

ubuntu@dhcppc1:/etc$ cd fstab
bash: cd: fstab: Not a directory

Edit: oh, fstab is a file isn't it?

Here we go:
/dev/mapper/casper-snapshot / auto noatime 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0

evilworm2
12 Oct 2006, 13:51
ubuntu@dhcppc1:~$ mount
/dev/mapper/casper-snapshot on / type auto (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
/dev on /.dev type unknown (rw,bind)
none on /dev type tmpfs (rw,size=5M,mode=0755)

fstab:
/dev/mapper/casper-snapshot / auto noatime 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0

So how do you want to acess your windows partitions? Ubuntu doesn't seem to know them.

What is the output of 'sudo fdisk -l'?

Xinos
12 Oct 2006, 14:01
I want total access. In case I can boot ubunthu again with my C: \ disk later, backups are in order before I format and start over.

Disk /dev/sda: 320.0 GB, 320072933376 bytes
16 heads, 63 sectors/track, 620181 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/sda1 2 620181 312570720 f W95 Ext'd (LBA)
/dev/sda5 2 620181 312570688+ 7 HPFS/NTFS
omitting empty partition (5)

Disk /dev/hda: 120.0 GB, 120034123776 bytes
240 heads, 63 sectors/track, 15505 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hda2 2 15505 117210240 f W95 Ext'd (LBA)
/dev/hda5 1383 15505 106769848+ 7 HPFS/NTFS

Disk /dev/hdb: 203.9 GB, 203928109056 bytes
16 heads, 63 sectors/track, 395136 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 2 395136 199148040 f W95 Ext'd (LBA)
/dev/hdb5 2 395136 199148008+ 7 HPFS/NTFS

But as of now, no computer (tried 2 other ones) can boot windows with my C:\ disk plugged in. And neither can I boot ubuntu live when it's in =\

So I guess I'll have to format and hope that some file recovery can fix it later. UNLESS there is a way to copy files to other harddrives while in the recovery console from the XP disk, because that I can acess. but so far I have never heard to access to other drives via that.

evilworm2
12 Oct 2006, 14:31
I want total access. In case I can boot ubunthu again with my C: \ disk later, backups are in order before I format and start over.

Yes, sure. ;) But how do you try to access them? Via clicking on the devices in '/dev'? That's the wrong way.



/dev/sda1 2 620181 312570720 f W95 Ext'd (LBA)
/dev/sda5 2 620181 312570688+ 7 HPFS/NTFS

/dev/hda2 2 15505 117210240 f W95 Ext'd (LBA)
/dev/hda5 1383 15505 106769848+ 7 HPFS/NTFS

/dev/hdb1 2 395136 199148040 f W95 Ext'd (LBA)
/dev/hdb5 2 395136 199148008+ 7 HPFS/NTFS


WTF? 6 Windows partitions?

You need to manually mount your partitions:

for ntfs:
sudo mkdir /windows
sudo mount -t ntfs -o defaults,user,umask=000 /dev/hda5 /windows

or

for fat32:
sudo mkdir /windows
sudo mount -t vfat -o defaults,user,umask=000 /dev/hda2 /windows

don't mount more than one partition in a folder. ;)

Xinos
12 Oct 2006, 15:27
cool that worked. Now I can see get at my D disk.

But C is hopeless. As I've said before no OS can boot when that drive is hooked up to the computer. I've tried on 3 other computers now aswell.

Does anyone know a good file recovery program for when I have windows freshly installed? I don't want to loose my 3 years of saved personal artwork that I've drawn. And all thoose textfiles that help me keep track of things =P
damn
damn
damn.

OMG, All this started because of TV media. IT'S FRICKIN ADWARE THAT RUINED MY COMPUTER!
I'm going to kill them. ... how do I make anthrax?

evilworm2
13 Oct 2006, 14:53
But C is hopeless. As I've said before no OS can boot when that drive is hooked up to the computer. I've tried on 3 other computers now aswell.

What is wrong with C exactly? What does the mount command say?

AndrewTaylor
13 Oct 2006, 15:47
.. how do I make anthrax?

Out of other anthrax, I'm afraid.

bonz
13 Oct 2006, 19:08
Out of other anthrax, I'm afraid.
To be found in large quantities here (http://en.wikipedia.org/wiki/Vozrozhdeniya_Island).

Xinos
15 Oct 2006, 17:35
Back on linux and I need to copy a file to one of the disks. But it says it's a read only file system. How do I change it?

*refreshes page every 15 seconds untill someone replys*

wormthingy
15 Oct 2006, 19:05
open terminal > "man chmod" > opens the manual of chmod, the command for changing rights on everything. you may need to open it as sudo (sudo man chmod)

Xinos
15 Oct 2006, 19:52
No, the filesystem is ntfs so i don't think it can work. I managed to get the file on there with different with a method, but it didn't solve it. Looks like I have to reinstall windows AGAIN.

This time the problem was that once I had Windows running I wanted to install Ubuntu. But since I have 4 harddrives grub goes haywire and problems kept leading to another. I exhausted..

evilworm2
15 Oct 2006, 19:57
Forget writing NTFS with linux. It is possible but it's very limited.

If you want to try anyway:
http://www.google.com/search?hl=en&q=Captive+NTFS&btnG=Google-Suche&meta=
http://bisqwit.iki.fi/story/howto/ntfs/

MadEwokHerd
16 Oct 2006, 08:57
If it's at all possible to write what you need to a filesystem that isn't ntfs, try that first. There's always a possibility writing ntfs from linux that you'll ruin the filesystem. :p

Xinos
16 Oct 2006, 15:53
Well, the only way to make the NTFS drive into a FAT or FAT32 would be to re-format it. And I wanted to access it so I could save some files before I reformated it ;)

Anyway. I'm back on Windows and I don't dare touch Linux installation again for quite some time. Linux only causes death and destruction in my life.