Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Verschlüsselung: Fehler beim Boot & kopieren...
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Wed Sep 12, 2012 5:32 pm    Post subject: [solved] Verschlüsselung: Fehler beim Boot & kopieren... Reply with quote

Wie manche schon wissen habe ich mein System verschlüsselt. Ich weiss nun nicht wie ich meine Dateien (also das Betriebssystem auf /dev/sdb2) auf den verschlüsselten Bereich (/dev/mapper/GENTOO-ROOT, oder irre ich mich?) kopiere? mit dd oder kann der das bei verschlüsselten Partitionen nicht?

Code:
>> Scanning for and activating Volume Groups:
  Reading all physical volumes. This may take a while...
  Found volume group "GENTOO" using metadata type lvm2
  2 logical volume(s) in volume group "GENTOO" now active
>> Determining root device...
>> Mounting /dev/mapper/GENTOO-ROOT as root...
>> Using mount -t auto -o ro
mount: mounting /dev/mapper/GENTOO-ROOT on /newroot failed: Invalid argument
!! Could not mount specified ROOT, try again
!! Could not find the root block device in .


Ist der Fehler den ich beim booten bekomme. Liegt daran das die Partition leer ist, oder?


Last edited by Gladdle on Wed Sep 19, 2012 3:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Wed Sep 12, 2012 6:19 pm    Post subject: Reply with quote

Ich würde von der Live-CD die Daten mit
Code:
cp -a /mnt/gentoo /mnt/usbdisk
zuerst auf eine ext4-formattierte externe Platte wegschieben, die Verschlüsselung einrichten, formatierenund dann die Daten in das neue verschlüsselte Dateisystem genauso zurückkopieren. Denke an den Parameter "-a". Damit werden alle Rechte uns sonstige Unix-besonderheiten 1:1 mit kopiert.
Es ist die sicherste Variante und hat als Nebeneffekt dass Deine Daten defragmentiert werden und Du anschließend ein Backup hast.
Back to top
View user's profile Send private message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Wed Sep 12, 2012 6:28 pm    Post subject: Reply with quote

Okay, aber was ist mit Verzeichnissen wie zum Beispiel /dev? Gibt das nicht ärger beim kopieren?
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Wed Sep 12, 2012 6:38 pm    Post subject: Reply with quote

Deswegen von einem Live-Medium aus, damit nichts durch irgend was "verwaltet" wird.
Du darfst also nicht wie beim chroot üblich /mnt/gentoo/proc oder /mnt/gentoo/dev mounten, sondern nur die Partition die Du verschlüsseln willst..
Im /mnt/gentoo/dev werden sicherlich ein Paar Device-Nodes unmanaged rumliegen. "cp -a" kann diese auch ganz normal kopieren, also im Ziel Dateisystem 1:1 anlegen.
Back to top
View user's profile Send private message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Thu Sep 13, 2012 7:36 pm    Post subject: Reply with quote

Ich kann die verschlüsselten Laufwerke nicht öffnen :oops:
Ich habe von einer CD / DVD gebootet und folgendes eingegeben:
Code:
cryptsetup luksOpen /dev/hda2 MAIN
lvscan
letzteres ergab diese Ausgabe:
Code:
   inactive        '/dev/GENTOO/SWAP' [8.00 GiB] inherit
   inactive        '/dev/GENTOO/ROOT' [224.64 GiB] inherit

Wie bekomme ich die Laufwerke eingebunden? denn unter /dev/GENTOO/ finde ich nichts.

EDIT: Google hat es gefunden: http://blog.tausys.de/2012/07/20/datenrettung-von-luks-lvm-partitionen/
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Fri Sep 14, 2012 7:04 am    Post subject: Reply with quote

Cryptsetup hat also schonmal geklappt. Jetzt musst Du die LV's noch aktivieren:
Code:
vgchange -a y
Back to top
View user's profile Send private message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Fri Sep 14, 2012 3:18 pm    Post subject: Reply with quote

Ich habe mir die Gentoo LiveDVD gebrannt, auf der anderen CD (amd64 minimal) ist die Aufloesung maximal 800x600. Ich habe die CD gestartet aber kann nicht per [alt] + [strg] + [F1] (2,3,...) auf eine Konsole wechseln. Auch das Tastaturlayout der Konsole in KDE kann ich nicht umstellen, normal ist es ja der Befehl loadkeys. Was mache ich falsch? Wie kann ich bei der Live CD/DVD das Tastaturlayout umstellen?
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4520
Location: Germany

PostPosted: Fri Sep 14, 2012 3:34 pm    Post subject: Reply with quote

Hm, ich kenne die aktuelle LiveDVD nicht - daher nur ein ungetesteter Quicktipp ;)
Versuche mal folgendes:
Für die Texkonsole setze in der /etc/conf.d/keymaps
keymap="de-latin1-nodeadkeys"
und lade die änderung dann mit einem "/etc/init.d/keymaps restart"

Unter X sollte vermutlich etwas wie
Code:
$ setxkbmap de nodeadkeys
vorerst passen.
Back to top
View user's profile Send private message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Fri Sep 14, 2012 8:05 pm    Post subject: Reply with quote

Josef.95 wrote:
Unter X sollte vermutlich etwas wie
Code:
$ setxkbmap de nodeadkeys
vorerst passen.
Hat gepasst, Danke!

Nun sind ALLE Daten auf die neue HDD kopiert worden, mtab UND fstab sind angepasst!!! Und wieder folgender Fehler:
Code:
>> LUKS device /dev/sda2 opened
>> Scanning for and activating Volume Groups:
  Reading all physical volumes. This may take a while...
  Found volume group "GENTOO" using metadata type lvm2
  2 logical volume(s) in volume group "GENTOO" now active
>> Determining root device...
>> Mounting /dev/mapper/GENTOO-ROOT as root...
>> Using mount -t auto -o ro
mount: mounting /dev/mapper/GENTOO-ROOT on /newroot failed: Invalid argument
!! Could not mount specified ROOT, try again
!! Could not find the root block device in .


Was muss ich machen?
P.S. Google verweist mich auf diesen Thread ;)
Back to top
View user's profile Send private message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Wed Sep 19, 2012 2:55 pm    Post subject: Reply with quote

Gladdle wrote:
Code:
>> Mounting /dev/mapper/GENTOO-ROOT as root...
>> Using mount -t auto -o ro
mount: mounting /dev/mapper/GENTOO-ROOT on /newroot failed: Invalid argument



Ist nicht genau das der Fehler? Das er auf /newroot Verweist? Müsste er nicht auf / verweisen?


EDIT: Okay, Problem gelöst:
Das alte Dateisystem hatte einen ext3 Treiber. Das neue habe ich auf ext4 "upgedated". Mein problem:
Ich habe vergessen im kernel den ext4 Treiber mit einzubinden!
Danke fuer euere Hilfe, das Brett vor meinem Kopf musste ich aber selbst entfernen :)


Last edited by Gladdle on Wed Sep 19, 2012 3:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum