LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-07-2008, 10:22 AM   #1
Strider_Max
LQ Newbie
 
Registered: Apr 2008
Posts: 18

Rep: Reputation: 0
Problems mounting an encripted partition ...


Hi,

My HP laptop that went to HP service and came back working has two disks.

One as installed a sort of an os called wind ... wind something ... oh! I think is winds bista ... or something like that ..
On the other hdd I have installed OpenSuSE 10.3.

I installed OpenSuSE 10.3 on this second drive, I boot from a flash pen and the following partitions are on disk:
/swap, / , /home /var

I encrypted /swap, / and /home following the instruction on http://en.opensuse.org/Encrypted_Roo...ith_SUSE_HOWTO

It all was perfect until the day the laptop died on me and was sent to HP support.
They warned me they could re-install winds on the first drive.

That was the case so they override the MBR.

I was just re-installing grub, booted with OpenSuSE DVD, choose rescue system, at the prompt write root, <ENTER> and then easily made:

grub
root (hd2,0)
setup (hd0)
quit

(note that hd2,0 is the flash pen, device sdc1 ... only one partition)

This installed grub on hd0 MBR. And the grub menu appeared with the boot options (no splash image though).

I checked on the /boot flash pen all boot and grub-related options, namely the file devices.map (correct mappings) and the all important menu.lst.

All seems correct but when I choose to boot the encrypted file systems it cames up with the message:

Error 17: Cannot mount selected partition

It recognizes the partition as a Linux filesystem but it can not mount it ...

anyone knows how to fix this?


Regards,
Pedro
 
Old 05-08-2008, 02:53 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by Strider_Max View Post
Hi,

My HP laptop that went to HP service and came back working has two disks.

One as installed a sort of an os called wind ... wind something ... oh! I think is winds bista ... or something like that ..
WindRiver?

Quote:
On the other hdd I have installed OpenSuSE 10.3.

[snip]

I encrypted /swap, / and /home following the instruction on http://en.opensuse.org/Encrypted_Roo...ith_SUSE_HOWTO

[snip]

All seems correct but when I choose to boot the encrypted file systems it cames up with the message:

Error 17: Cannot mount selected partition
... probably because it's encrypted.
Quote:

It recognizes the partition as a Linux filesystem but it can not mount it ...

anyone knows how to fix this?
Check that your encryption keys are still in /boot (pendrive).
Go back over those instructions again - see what needs to be different in grub etc to decrypt then mount the partitions.

[edit]Ahhh... I note that there is no text on that page... so you're going to have to spell it out: which method did you use to encrypt the partitions?

Of course, it is possible that the tech guys damaged your encryption.

Last edited by Simon Bridge; 05-08-2008 at 02:57 AM.
 
Old 05-08-2008, 07:17 AM   #3
Strider_Max
LQ Newbie
 
Registered: Apr 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Hi,

Quote:

WindRiver?
... I wish ...


Quote:
... probably because it's encrypted.
Check that your encryption keys are still in /boot (pendrive).
Go back over those instructions again - see what needs to be different in grub etc to decrypt then mount the partitions.
The Grub config files in my /boot partition (the flash pen) are exactly the same as before.
So nothing changed there ...
The kernel parameters for the boot support the same encryption layer (mapper) as before.
Also I think (I must check this one as i am not sure) that Luks uses symmetric encryption, hence no keys are necessary.

A menu.lst file looks like the following:

## Part of Grub File

###Encrypted Root###
title OpenSuSE 10.3 - Encrypted
root (hd2,0)
kernel /vmlinuz-2.6.22.17-0.1-default root=/dev/mapper/root luks_root=/dev/sdb3 luks_swap=/dev/sdb1 luks_home=/dev/sdb2 luks="root swap home"
vga=0x317 resume=/dev/sdb1 pci=nommconf splash=silent showopts
initrd /initrd-2.6.22.17-0.1-default
## Part of Grub file

the decives.map file also looks correct:

(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc

Using fdisk after booting with either Knopix or the OpenSuSE 64bit rescue mode this is confirmed, usb flash is /dev/sdc first disk is /dev/sda ... / is on partition /dev/sdb3 adn so on.

So apparently all should work from the start ...


[/QUOTE]
[edit]Ahhh... I note that there is no text on that page... so you're going to have to spell it out: which method did you use to encrypt the partitions?

Of course, it is possible that the tech guys damaged your encryption.[/QUOTE]

I used the Luks file system type of encryption for the partitions.
hummm try again:

http://en.opensuse.org/Encrypted_Root_File_System
It is the usual great opensuse.org site.

I also suspect that tech support damaged the disks .. althouhg that also seems remote ... they "had" to reinstalls the other crappy os ... even if I insisted that was not necessary ... tehy could test the hardware booting from a CD ....

Oh boy! sometimes I forgot that not everyone uses Linux


Regards,
Pedro

Last edited by Strider_Max; 05-08-2008 at 07:19 AM.
 
Old 05-08-2008, 09:43 AM   #4
Strider_Max
LQ Newbie
 
Registered: Apr 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Some corrections ...

Hi,

Some corrections are due in the previous posts ....
First the error message from Grub is that is does not recognize the filesystem, not like I have told the partition.
Grub knows the partitions are ext3.

Also Luks (cryptsetup) use keys.


I can see all the data inside, so the tech support obviously did not mess my disks, they just re-installed crappyware os on disk1 (sda) as they had to.

Also booting from DVD in rescue mode I can mount all the partitions.

I just simply use the cryptsetup command luksOpen .. simple
and then mount the /dev/mapper/root and /dev/mapper/home in /mnt

And all the information is inside.

/, /home ... all.

But still it is _Very_ annoying not being able to boot again


Regards,
Pedro
 
Old 05-08-2008, 10:35 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Here's your error...
Quote:
17 : "Invalid device requested"
This error is returned if a device string is recognizable but does not fall under the other device errors.
Is it possible that the tech team went into the bios? It's just that there is a subtle way of generating that error if the HDD setting in BIOS have been fiddled... check:

1. Enter BIOS
2. Make sure all HDD's are detected.
3. Search for the HDD that has linux installed and set its MODE to AUTO (not LBA, large, or normal)
4. Also, if you have this option available, set TYPE to USER, but don't change any of the figures that were automatically detected.
5. And you are done!

Just in case this doesn't work, then:
6. Set all drives to TYPE --> USER and MODE --> AUTO (not LBA, large or normal)
 
Old 11-23-2008, 02:38 PM   #6
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Rep: Reputation: 30
Quote:
17 : Cannot mount selected partition
This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.
From the GRUB manual, http://www.gnu.org/software/grub/manual/grub.html. This means to me that GRUB does not know the filesystem is ext3!
 
Old 11-23-2008, 07:50 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Yeah - that would happen if the FS is encrypted, but GRUB does not know this. Which would imply an improperly installed fs.

Note - my quote also comes from the grub manual - just a different edition.

So, Strider, how did you get on?

Last edited by Simon Bridge; 11-23-2008 at 07:52 PM.
 
  


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
problems on mounting NTFS partition Fill Linux - Hardware 4 06-08-2007 02:24 AM
mount passwdfd option with encripted partition or file crions Linux - Security 1 02-01-2006 04:35 AM
Problems mounting LVM-partition RacerDude Fedora 1 11-22-2005 11:04 AM
problems mounting ntfs partition wisdom Linux - Software 3 11-11-2005 04:48 AM
problems mounting vfat partition oDyman Slackware 6 11-11-2004 05:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:54 AM.

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
Open Source Consulting | Domain Registration