Refind

sketch

resource: http://www.rodsbooks.com/ubuntu-efi/

in uefi bios (F2 at start) enable UEFI booting only
boot up ubuntu
set up initernet on it
download gdisk: sudo apt-get install gdisk

add "universe" repository:

sudo vi /etc/apt/sources.list
deb http://gb.archive.ubuntu.com/ubuntu/ saucy universe
sudo apt-get update

install "mc":
sudo apt-get install mc

install "synaptic":
sudo apt-get install synaptic

gdisk

sudo gdisk /dev/sda

ubuntu@ubuntu:~$ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1CA95E11-E925-4DA2-99B9-6586E2DAF97F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 3436 sectors (1.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1023999   499.0 MiB   2700  Basic data partition
   2         1024000         1638399   300.0 MiB   EF00  EFI system partition
   3         1638400         1900543   128.0 MiB   0C01  Microsoft reserved part
   4         1900544      1903028224   906.5 GiB   0700  Basic data partition
   5      1903028225      1951426560   23.1 GiB    2700  Basic data partition
   6      1951426561      1953523712   1024.0 MiB  2700  Basic data partition

$ mount

/dev/sda1 on /media/ubuntu/Windows RE tools type fuseblk [ntfs] 
 (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda6 on /media/ubuntu/SAMSUNG_REC type vfat 
 (rw,nosuid,nodev,uid=999,gid=999,shortname=mixed,
  dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
/dev/sda4 on /media/ubuntu/F43A23253A22E3F8 type fuseblk [ntfs]
 (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda5 on /media/ubuntu/SAMSUNG_REC2 type fuseblk [ntfs]
 (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda2 on /media/ubuntu/sda2_efi type vfat (rw)

Some more info about 0C01 Microsoft reserved part:
http://msdn.microsoft.com/en-us/windows/hardware/gg463525.aspx
http://en.wikipedia.org/wiki/Microsoft_Reserved_Partition

Usual windows rant:
It is basically some windows temporary shit while disk resizing or other hidden temporary data.
Why the hell they could not make a temporary windows.tmp file inside efi partition, and forget about to create a yet another partition because we can do it. The uefi partition is already 512MB recommended size….

Rant2:
sda4 partition uses 42GB, that is the windows installation partition.
sda5 partition uses 24GB, which is the installation image of the sda4 partition

Brings back memories of having a single install CD for windows. Not a 66GB shit, what it is now.

How to check partition type?
mount does not give anything useful (fuseblk), here it is:

$ sudo blkid /dev/sda4
/dev/sda4: UUID="F43A23253A22E3F8" TYPE="ntfs"

Mount everything and backup

/dev/sda1       499M  343M  157M  69% /media/ubuntu/Windows RE tools
/dev/sda2       296M   43M  254M  15% /media/ubuntu/sda2_efi
/dev/sda3       128MB C0C1 WINDOWS_TEMP_partition
/dev/sda4       907G   43G  865G   5% /media/ubuntu/F43A23253A22E3F8
/dev/sda5        24G   23G  1.1G  96% /media/ubuntu/SAMSUNG_REC2
/dev/sda6      1020M  608M  413M  60% /media/ubuntu/SAMSUNG_REC

backup partition table:

sudo gdisk /dev/sda
b
samsung_gpt_table

backup each partition:

/media/ubuntu/SAMSUNG_REC$ tar -czvf big/samsung_windows_sda4_F43A23253A22E3F8.tar.gz F43A23253A22E3F8/

$ tar -czvf big/samsung_windows/samsung_rec_sda6_1020m.tar.gz SAMSUNG_REC
$ tar -czvf big/samsung_windows/samsung_rec2_sda5_24g.tar.gz SAMSUNG_REC2

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-NoDerivs 3.0 License