Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 23/03/2015, à 20:29

malou

[Resolu]Perte de partition encrytptee LUKS apres erreur de reformatage

Bonjour

En demarrant mon pc, je me suis retrouver devant un Error : unknown filesystem... Enter Recovery mode.

Apres reflexion, mon probleme est probablement du a une erreur de ma part en essayant de reformater un disque dur externe. Je m'explique : j'ai voulu reformater un disque dur externe avec Gparted hier, et apres un message d'erreur, j'y suis parvenu. Je suppose que ce message d'erreur est apparu a un moment ou j'ai essayer de formater mon propre disque dur, celui interne, sur lequel mon systeme tourne. Aucun probleme subsequent n'est arrive jusqu'a ce que j'arrete mon pc, puis essaye de le redemarrer. Je suppose donc que toutes mes donnes sont toujours sur le disque dur, mais que mon systeme de partition est corrompu/non reconnu.

J'ai commence par lancer boot-repair-disk en live session, qui ne m'a pas enormement aide mais m'a fourni le log suivant

 Boot Info Script e7fc706 + Boot-Repair extra info      [Boot-Info 23Nov2014]


============================= Boot Info Summary: ===============================

 => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos1)/grub.
 => FreeDOS (eXtended FDisk) is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: unknown filesystem type ''

sdb1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.03 2010-10-22 ........>..sr>.......u.v7...0...~.....~...f...M.f.f....f..0~....>E}.u......
    Boot sector info:  Syslinux looks at sector 14756426 of /dev/sdb1 for 
                       its second stage. SYSLINUX is installed in the  
                       directory. No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /syslinux.cfg /casper/vmlinuz.efi 
                       /EFI/BOOT/grubx64.efi /ldlinux.sys

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1               2,048   468,860,927   468,858,880   b W95 FAT32


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 7747 MB, 7747397632 bytes
32 heads, 63 sectors/track, 7505 cylinders, total 15131636 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1    *             63    15,130,079    15,130,017   b W95 FAT32


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/sdb1        7FC0-5044                              vfat       KINGSTON
/dev/zram0       c1f085a8-afe8-4edd-82b4-9c5888ea063a   swap       
/dev/zram1       4a4757c7-f19b-4037-ae3d-2f00e6bca4c1   swap       
/dev/zram2       32e2ecd8-378e-415f-80d4-3e1caa7da53e   swap       
/dev/zram3       26b1879d-627d-4041-8dfa-07d9383c1330   swap       
/dev/zram4       c8d0d472-6f1d-4460-8025-0da23a743cf0   swap       
/dev/zram5       674b0aca-5967-4a9b-90e4-664520205ed7   swap       
/dev/zram6       0fdf0612-31c7-40ea-9bc7-725b4ebac114   swap       
/dev/zram7       a5851c5a-c60e-4f37-8002-4461c3369c68   swap       

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root  9 Mar 23 17:05 ata-KINGSTON_SV300S37A240G_50026B7242045BE7 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 23 17:05 ata-KINGSTON_SV300S37A240G_50026B7242045BE7-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 Mar 23 17:05 ata-Slimtype_DVD_A_DU8A5SH_672330403191 -> ../../sr0
lrwxrwxrwx 1 root root  9 Mar 23 17:05 usb-Kingston_DataTraveler_2.0_60A44C3FB03BFF11898F3192-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 23 17:05 usb-Kingston_DataTraveler_2.0_60A44C3FB03BFF11898F3192-0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Mar 23 17:05 wwn-0x50026b7242045be7 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 23 17:05 wwn-0x50026b7242045be7-part1 -> ../../sda1

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/loop0       /rofs                    squashfs   (ro,noatime)
/dev/sdb1        /cdrom                   vfat       (ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)


=========================== sdb1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------

if loadfont /boot/grub/font.pf2 ; then
	set gfxmode=auto
	insmod efi_gop
	insmod efi_uga
	insmod gfxterm
	terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Boot-Repair-Disk session" {
	set gfxpayload=keep
	linux	/casper/vmlinuz.efi  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash --
	initrd	/casper/initrd.lz
}
--------------------------------------------------------------------------------

============================== sdb1/syslinux.cfg: ==============================

--------------------------------------------------------------------------------
default menu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash --

label ubnentry0
menu label ^Help
kernel /ubnkern
append initrd=/ubninit 

label ubnentry1
menu label ^64bit session
kernel /casper/vmlinuz.efi
append initrd=/casper/initrd.lz file=/cdrom/preseed/lubuntu.seed boot=casper  quiet splash --

label ubnentry2
menu label ^64bit session (failsafe)
kernel /casper/vmlinuz.efi
append initrd=/casper/initrd.lz file=/cdrom/preseed/lubuntu.seed boot=casper  noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal --

label ubnentry3
menu label Boot-Repair-Disk session
kernel /casper/vmlinuz.efi
append initrd=/casper/initrd.lz file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash --

--------------------------------------------------------------------------------

============== sdb1: Version of COM32(R) files used by Syslinux: ===============

 menu.c32                           :  COM32R module (v4.xx)

=============================== StdErr Messages: ===============================

cat: write error: Broken pipe
File descriptor 9 (/proc/2027/mounts) leaked on lvs invocation. Parent PID 7705: bash
File descriptor 63 (pipe:[23365]) leaked on lvs invocation. Parent PID 7705: bash
  No volume groups found

ADDITIONAL INFORMATION :
=================== log of boot-repair 2015-03-23__17h05 ===================
boot-repair version : 4ppa14
boot-sav version : 4ppa14
glade2script version : 3.2.2~ppa47~saucy
boot-sav-extra version : 4ppa14
File descriptor 9 (/proc/2027/mounts) leaked on lvs invocation. Parent PID 4618: /bin/sh
No volume groups found
boot-repair is executed in live-session (Boot-Repair-Disk 64bit 29nov2014, trusty, Ubuntu, x86_64)
ls: cannot access /home/usr/.config: No such file or directory
CPU op-mode(s):        32-bit, 64-bit
initrd=/ubninit file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash -- BOOT_IMAGE=/ubnkern

=================== os-prober:


=================== blkid:
/dev/loop0: TYPE="squashfs"
/dev/sdb1: LABEL="KINGSTON" UUID="7FC0-5044" TYPE="vfat"
/dev/zram0: UUID="c1f085a8-afe8-4edd-82b4-9c5888ea063a" TYPE="swap"
/dev/zram1: UUID="4a4757c7-f19b-4037-ae3d-2f00e6bca4c1" TYPE="swap"
/dev/zram2: UUID="32e2ecd8-378e-415f-80d4-3e1caa7da53e" TYPE="swap"
/dev/zram3: UUID="26b1879d-627d-4041-8dfa-07d9383c1330" TYPE="swap"
/dev/zram4: UUID="c8d0d472-6f1d-4460-8025-0da23a743cf0" TYPE="swap"
/dev/zram5: UUID="674b0aca-5967-4a9b-90e4-664520205ed7" TYPE="swap"
/dev/zram6: UUID="0fdf0612-31c7-40ea-9bc7-725b4ebac114" TYPE="swap"
/dev/zram7: UUID="a5851c5a-c60e-4f37-8002-4461c3369c68" TYPE="swap"

=================== UEFI/Legacy mode:
This live-session is not in EFI-mode.
SecureBoot maybe enabled.


=================== PARTITIONS & DISKS:



=================== parted -l:

Model: ATA KINGSTON SV300S3 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
1      1049kB  240GB  240GB  primary


Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdb: 7747MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      32.3kB  7747MB  7747MB  primary  fat32        boot



                                                                          
Error: /dev/zram0: unrecognised disk label


                                                                          
Error: /dev/zram1: unrecognised disk label


                                                                          
Error: /dev/zram2: unrecognised disk label


                                                                          
Error: /dev/zram3: unrecognised disk label


                                                                          
Error: /dev/zram4: unrecognised disk label


                                                                          
Error: /dev/zram5: unrecognised disk label


                                                                          
Error: /dev/zram6: unrecognised disk label


                                                                          
Error: /dev/zram7: unrecognised disk label

=================== parted -lm:

BYT;
/dev/sda:240GB:scsi:512:512:msdos:ATA KINGSTON SV300S3;
1:1049kB:240GB:240GB:::;

BYT;
/dev/sdb:7747MB:scsi:512:512:msdos:Kingston DataTraveler 2.0;
1:32.3kB:7747MB:7747MB:fat32::boot;


                                                                          
Error: /dev/zram0: unrecognised disk label


                                                                          
Error: /dev/zram1: unrecognised disk label


                                                                          
Error: /dev/zram2: unrecognised disk label


                                                                          
Error: /dev/zram3: unrecognised disk label


                                                                          
Error: /dev/zram4: unrecognised disk label


                                                                          
Error: /dev/zram5: unrecognised disk label


                                                                          
Error: /dev/zram6: unrecognised disk label


                                                                          
Error: /dev/zram7: unrecognised disk label


=================== mount:
/cow on / type overlayfs (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
/dev/sdb1 on /cdrom type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=lubuntu)


=================== ls:
/sys/block/sda (filtered):  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro sda1 size slaves stat subsystem trace uevent
/sys/block/sdb (filtered):  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro sdb1 size slaves stat subsystem trace uevent
/sys/block/sr0 (filtered):  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro size slaves stat subsystem trace uevent
/dev (filtered):  autofs block bsg btrfs-control bus cdrom char console core cpu cpu_dma_latency cuse disk dri ecryptfs fb0 fd full fuse hpet input kmsg kvm log mapper mcelog mei mem net network_latency network_throughput null port ppp psaux ptmx pts random rfkill rtc rtc0 sda sda1 sdb sdb1 sg0 sg1 sg2 shm snapshot snd sr0 stderr stdin stdout uhid uinput urandom v4l vga_arbiter vhci vhost-net video0 watchdog watchdog0 zero
ls /dev/mapper:  control

=================== df -Th:

Filesystem     Type       Size  Used Avail Use% Mounted on
/cow           overlayfs  3.9G  5.2M  3.9G   1% /
udev           devtmpfs   3.9G   12K  3.9G   1% /dev
tmpfs          tmpfs      787M  1.1M  785M   1% /run
/dev/sdb1      vfat       7.3G  1.3G  6.0G  18% /cdrom
/dev/loop0     squashfs   549M  549M     0 100% /rofs
none           tmpfs      4.0K     0  4.0K   0% /sys/fs/cgroup
tmpfs          tmpfs      3.9G  8.0K  3.9G   1% /tmp
none           tmpfs      5.0M     0  5.0M   0% /run/lock
none           tmpfs      3.9G     0  3.9G   0% /run/shm
none           tmpfs      100M   16K  100M   1% /run/user

=================== fdisk -l:

Disk /dev/sda: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000456ec

Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   468860927   234429440    b  W95 FAT32

Disk /dev/sdb: 7747 MB, 7747397632 bytes
32 heads, 63 sectors/track, 7505 cylinders, total 15131636 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x59651ba7

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63    15130079     7565008+   b  W95 FAT32


Error: no partitions


=================== Suggested repair
The default repair of the Boot-Repair utility would not act on the MBR.
Additional repair would be performed:  repair-filesystems


=================== User settings
The settings chosen by the user will not act on the boot.

J'ai par la suite redemarrer sur une live session d'ubuntu de laquelle j'ai pu tirer les infos suivantes :

sfdisk

Disk /dev/sda: 29185 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sda1          2048 468860927  468858880   b  W95 FAT32
/dev/sda2             0         -          0   0  Empty
/dev/sda3             0         -          0   0  Empty
/dev/sda4             0         -          0   0  Empty

Disk /dev/sdb: 1021 cylinders, 239 heads, 62 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/32/63 (instead of 1021/239/62).
For this listing I'll assume that geometry.
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdb1   *        63  15130079   15130017   b  W95 FAT32
		end: (c,h,s) expected (1023,31,63) found (336,31,63)
/dev/sdb2             0         -          0   0  Empty
/dev/sdb3             0         -          0   0  Empty
/dev/sdb4             0         -          0   0  Empty
ubuntu@ubuntu:~$ udisks --show-info /dev/sda
Showing information for /org/freedesktop/UDisks/devices/sda
  native-path:                 /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
  device:                      8:0
  device-file:                 /dev/sda
    presentation:              /dev/sda
    by-id:                     /dev/disk/by-id/ata-KINGSTON_SV300S37A240G_50026B7242045BE7
    by-id:                     /dev/disk/by-id/wwn-0x50026b7242045be7
  detected at:                 Mon 23 Mar 2015 06:16:32 PM UTC
  system internal:             1
  removable:                   0
  has media:                   1 (detected at Mon 23 Mar 2015 06:16:32 PM UTC)
    detects change:            0
    detection by polling:      0
    detection inhibitable:     0
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  automount hint:              
  size:                        240057409536
  block size:                  512
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  partition table:
    scheme:                    mbr
    count:                     1
  drive:
    vendor:                    ATA
    model:                     KINGSTON SV300S37A240G
    revision:                  520ABBF0
    serial:                    50026B7242045BE7
    WWN:                       50026b7242045be7
    detachable:                0
    can spindown:              1
    rotational media:          No
    write-cache:               enabled
    ejectable:                 0
    adapter:                   Unknown
    ports:
    similar devices:
    media:                     
      compat:                 
    interface:                 ata
    if speed:                  (unknown)
    ATA SMART:                 Data not collected

Enfin ma partition etait une partition encryptee Luks.
Mon objectif est de recuperer mes donnees.

Merci a toute personne qui pourra m'aider

Edit : Testdisk me trouve deux partitions : Linux, une ext2 bootable et une luks, dois-je faire [write] ?

Dernière modification par malou (Le 24/03/2015, à 18:40)


enfin libre !!! ( www.hcnogent.fr, www.arsenal28.fr )

Hors ligne

#2 Le 24/03/2015, à 00:20

le cinglé_001

Re : [Resolu]Perte de partition encrytptee LUKS apres erreur de reformatage

Bonsoir.

Je ne pas vraiment vraiment t'aider vu que ta partition était chiffrée mais tu peux essayer avec photorec

#3 Le 24/03/2015, à 18:38

malou

Re : [Resolu]Perte de partition encrytptee LUKS apres erreur de reformatage

Merci pour ta reponse.
J'ai finalement pu recuperer mes donnees sans passer par photorec.

En utilisant testdisk, j'ai pu reecrire les deux partitions mentionnees precedemment (une ext2 and une LUKS, qui est celle qui m'interesse)
Les headers LUKS ne precisent pas la taille des partitions, je me suis donc retrouve avec une partition LUKS de 2,1 MB. Il s'agit en realite juste du header de la partition LUKS.
J'ai ensuite pu utiliser fdisk pour etendre cette partition (la supprimer, puis la recreer avec le meme secteur de depart, mais avec le dernier secteur du disque pour secteur de fin)
Apres redemarrage (toujours avec un live cd) j'obtiens une partition LUKS de 240Giga, il ne me reste qu'a l'ouvrir avec Nautilus et taper mon mot de passe, et je retrouve tous mes fichiers et dossiers bien ranges. (Avec quelques petits problemes de permissions sur certains fichiers, mais rien d'insurmontable)

En esperant que cela aura aide certains ( et desole pour les accents, j'ai un clavier US)
Voir aussi mon cas sur ce forum http://www.linuxquestions.org/questions … 175537666/

Dernière modification par malou (Le 24/03/2015, à 18:39)


enfin libre !!! ( www.hcnogent.fr, www.arsenal28.fr )

Hors ligne