Debian Custom Encrypted LVM Install - Impossible To Achieve

Hi there!

After my NVIDIA card died I decided it was time to buy an AMD card again (R9 270X), but I didn't think AMD drivers were such a pain in Linux as people said. Of course, in some distros anyway. On Arch, for example, there's no official release because Arch's developers would have to hold Xorg in order to make a closed-source driver available, because AMD's pace isn't in pair with Linux. So in order to install AMD's drivers on Arch I must rely on some guy's unnoficial repositories, but that isn't the whole problem. Even though I'm cool with adding repos and downgrading Xorg, I'm not cool with it not working for a lot of apps, so that's where I decided to try a few distros. Manjaro is a no-go because it installs Flash as default. openSUSE although is a very good distro, is a complete mess when it comes to repositories, specially multimedia ones. Ubuntu/Mint are also a no-go, Ubuntu because after 12.04 they have a spyware by default, and Mint because it contains non-free stuff by default.

So here I come! I ran Debian in the past for a long time (aside from a breaf period last year) and it was lovely, I could easily set up a custom encrypted install, but now I don't remember how to, and it's killing me. I don't like how the installer doesn't show the partitions size as they actually are, and I don't like how the automated encrypted LVM setup doesn't let me chose the encryption algorithm or the timeframe between each passphrase attempt. That's why I must create my install, and here's what I used to do on Arch (the part that really matters), converted to what I use on Debian:

Code:
# modprobe dm-mod

(create one 1GB partition for /boot, unencrypted ; create another big 930 GB formatted as "8e" - LVM - on dev/sda2)
Code:
# fdisk /dev/sda

(chose my ciphers and iter time)
Code:
# cryptsetup -c twofish-xts-plain64 -y-s 512 --iter-time 5000 luksFormat /dev/sda2

(open the luks container on "sda2_crypt")
Code:
# cryptsetup open --type luks /dev/sda2 sda2_crypt

(create physical volume on sda2_crypt)
Code:
# pvcreate /dev/mapper/sda2_crypt

(create volume group "debian" on sda2_crypt)
Code:
# vgcreate debian /dev/mapper/sda2_crypt

(create volumes)
Code:
# lvcreate -L 8G system -n root
# lvcreate -L 60G system -n swap
# lvcreate -l 100%FREE system -n home

After this is done, I go to the "partition disks" page where I select each partition/volume to it's correct destination. I then procceed to installing the base system, configuring apt, and all that. Now, before I install Grub I used to execute the following commands on shell:

Code:
 # nano /etc/crypttab

I used to put something there, but I don't remember what exactly. It's been a long time since I used Debian for long! But here's what I put the

Code:
sda2_crypt /dev/mapper/sda2_crypt none luks

Then I procceeded to instal syslinux (I REALLY don't like GRUB)

Code:
# chroot /target
# apt-get install syslinux

But I get the following error:

Quote:
E: cannot write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory).
I'm assuming this is just a non-critical error. But this is not the problem, the problem is when I try to install syslinux:

Code:
# syslinux-install_update -i -a -m

The output:

Quote:
/bin/sh: 2: syslinux-install_update: not found
Then I type "syslinux --help":

Code:
# syslinux -h

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
I tried literaly every possible combination that would make sense in Arch and yet I can't install it. The Debian documentation on syslinux doesn't help at all, and the Arch's Wiki on Syslinux... well, tells how to make it work on Arch It used to work the same way on Debian, but now it doesn't.

Here's a little list of the errors I get:

Code:
# syslinux -i -U

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
Code:
#syslinux --install --update

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
Code:
# syslinux --install --update -i -a -m

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
Oh, and also users are still not able to press TAB to get the full command without typing it? And we can't even press the up arrow key that we get "^[[A"? :P Whaat?

What am I doing wrong?

I'm really not with the time to mess with these kinds of things, so either I figure this out REAL SOON or I'll be forced to get back to Windows


Similar Content



Configuring A Dual Boot Arch And Fedora Installation

I have setup a dual boot system with Fedora 21 and Arch Linux. The problem is that Fedora doesn't see my encrypted Arch installation. The installations are on separate partitions and do not share anything apart from hard disk space. I have run the following commands as root in Fedora:

Code:
grub2-install /dev/sda

Code:
os-prober

Code:
grub2-mkconfig -o /boot/grub2/grub.cfg

When I rebooted, Fedora was the only OS entry showing in the GRUB menu.

There was a suggestion from one of the members of the Arch forums that I should write the entry myself into /etc/grub.d/40_custom and then re-build the grub configuration or take the Arch entry from Arch's /boot/grub/grub.cfg and just paste it into the 40_custom in Fedora and rebuild.

How do I boot from a live Arch USB stick into the installed Arch and do as stated above? How would it work? Thanks in advance for your replies.

Grub Directory Has Disappeared - Can't Reinstall Grub

I have tried installing a Ubuntu OS onto a partition (sda3).
When I had difficulties with the install, I decided to delete everything from the partition.

But now when I boot the computer, I get taken to the 'grub rescue' prompt.
I have tried to find grub in my other partitions (sda1 and sda2).
However, the command 'ls (hd0,msdos1)/' for example, does not show a grub directory.
It must've transferred grub to sda3 somehow and now I've deleted it.

I have debian live USB and am trying to install grub with:
Code:
apt-get install-grub /dev/sda

But I get the error message:
Code:
bash: grub-install: command not found

So now I don't know what's going on. Can anyone please help?

UEFI Vs Debian - Cannot Boot Into Grub After Installation

The installation of the latest stable on my Lenovo G505s went just fine in UEFI mode but when the installation finished I never reach grub during the bootup process. I put Refind media onto a usb stick and boot into my computer using it after that I tried to follow this guide https://wiki.debian.org/GrubEFIReinstall but I'm having some trouble.

When I start the computer with the "Refind media" it gives me 3 options where the first is

"Boot EFI\debian\grubx64.efi from 510 Mib Fat Volume" If I choose this option it takes me to grub via eufi(?) and then I can get into my computer as usual.

How can I make my computer understand that it should recognize and boot from EFI\debian\grubx64.efi, 510 Mib Fat Volume?

I found https://wiki.debian.org/EFIStub and since my
/boot/efi/EFI/debian looks like; grubx64.efi initrd.img-3.16.0-4-amd64 vmlinuz-3.16.0-4-amd64
I tried the following
Code:
# efibootmgr -c -g -L "Debian (EFI stub)" -l '\EFI\debian\grubx64.efi' -u 'root=UUID=$UUID ro quiet rootfstype=ext4 add_efi_memmap initrd=\\EFI\\debian\\initrd.img-3.16.0-4-amd-64'
efibootmgr: Could not set variable Boot0005: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory

Code:
    [ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
    EFI boot on HDD


     apt-get install --reinstall grub-efi

went just fine and I have /dev/sda1 mounted on /boot/efi
but when I try grub-install I get

Code:
grub-install /dev/sda
Installing for x86_64-efi platform.
efibootmgr: Could not set variable Boot0005: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory
Installation finished. No error reported.

What is going wrong here?

Code:
    update-grub
    Generating grub configuration file ...
    Found background image: .background_cache.png
    Found linux image: /boot/vmlinuz-3.16.0-4-amd64
    Found initrd image: /boot/initrd.img-3.16.0-4-amd64
    Adding boot menu entry for EFI firmware configuration
    done

Code:
file /boot/efi/EFI/debian/grubx64.efi
/boot/efi/EFI/debian/grubx64.efi: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows

but efibootmgr --verbose | grep debian gives me nothing. If I run efibootmgr without grep I get:

Code:
    efibootmgr --verbose
    BootCurrent: 0002
    Timeout: 0 seconds
    BootOrder: 2001,0003,0004,0001,0000,2002,2003
    Boot0000* USB HDD     : SanDisk U3 Cruzer Micro    BIOS(2,500,00)..................3.......1...5........................................
    Boot0001* USB ODD     : SanDisk U3 Cruzer Micro    BIOS(3,500,00)..................;.......9...=........................................
    Boot0002* EFI USB Device   ACPI(a0341d0,0)PCI(10,0)USB(2,0)0311050000HD(1,800,2d5f,55fc859c-5227-4cd5-bd64-a4fd678ba8b6)RC
    Boot0003* SATA HDD    : ST1000LM014-1EJ164                         BIOS(2,0,00).......................................................................
    Boot0004* SATA ODD    : MATSHITADVD-RAM UJ8C2                      BIOS(3,0,00).......................................................................
    Boot2001* EFI USB Device   RC
    Boot2002* EFI DVD/CDROM   RC
    Boot2003* EFI Network   RC

Here is some additonial information which might be relevant.

Code:
    # df -h
    Filesystem                 Size  Used Avail Use% Mounted on
    /dev/dm-1                  9.1G  2.5G  6.2G  29% /
    udev                        10M     0   10M   0% /dev
    tmpfs                      1.4G  9.1M  1.4G   1% /run
    tmpfs                      3.5G   68K  3.5G   1% /dev/shm
    tmpfs                      5.0M  4.0K  5.0M   1% /run/lock
    tmpfs                      3.5G     0  3.5G   0% /sys/fs/cgroup
    /dev/sda2                  237M   35M  190M  16% /boot
    /dev/sda1                  511M  132K  511M   1% /boot/efi
    /dev/mapper/ludo--vg-home  893G  103M  848G   1% /home
    tmpfs                      713M  4.0K  713M   1% /run/user/117
    tmpfs                      713M  8.0K  713M   1% /run/user/1000

Code:
fdisk -l

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0080BBEA-1B46-4EAE-9471-CC523BFCAD44

Device       Start        End    Sectors   Size Type
/dev/sda1     2048    1050623    1048576   512M EFI System
/dev/sda2  1050624    1550335     499712   244M Linux filesystem
/dev/sda3  1550336 1953523711 1951973376 930.8G Linux filesystem

GPT PMBR size mismatch (13695 != 2009726) will be corrected by w(rite).

Disk /dev/sdb: 981.3 MiB, 1028980224 bytes, 2009727 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
Disklabel type: gpt
Disk identifier: E4A93BB9-2F9C-4487-B090-91B620879E4C

Device     Start   End Sectors  Size Type
/dev/sdb1   2048 13662   11615  5.7M EFI System

Disk /dev/mapper/sda3_crypt: 930.8 GiB, 999408271360 bytes, 1951969280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/ludo--vg-root: 9.3 GiB, 9999220736 bytes, 19529728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/ludo--vg-swap_1: 14.4 GiB, 15439233024 bytes, 30154752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/ludo--vg-home: 907.1 GiB, 973967720448 bytes, 1902280704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Trying To Dd A Server With LVM To Another Ext HD, Then To Another Server

I have Linux enterprise server 11 sp3 with 3 250 GB WD blue drives in a raid 5 configuration.

Server “A” (external drive not plugged in):
Code:
Disk /dev/sda: 499.0 GB, 499021512704 bytes
255 heads, 63 sectors/track, 60669 cylinders, total 974651392 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: 0x00059fd2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1028095      513024   83  Linux
/dev/sda2         1028096    21993471    10482688   82  Linux swap / Solaris
/dev/sda3        21993472   974651391   476328960   8e  Linux LVM

Disk /dev/mapper/VG_SYSTEM-ROOT: 487.8 GB, 487755612160 bytes
255 heads, 63 sectors/track, 59299 cylinders, total 952647680 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: 0x00000000

Disk /dev/mapper/VG_SYSTEM-ROOT doesn't contain a valid partition table

I am trying to clone this machine to another server, both servers are Dell Poweredge 1900, with 3 – 250 WD drives (the only difference is the ‘B’ server has WD Cavier drives), pretty much identical machines, same processor and ram. I have a 2TB ext hard drive that I am using to store the output of DD. I have booted from the CD to a rescue system, then mounted my 2TB ext and did the following:
Code:
    # dd if=/dev/sda conv=sync,noerror bs=64k | gzip –c | split –a3 –b 2G –verbose - /mnt/exthd/

This gives me the following files on my external hard drive:
Code:
    
-rwxr-xr-x 1 root root 2147483648 Jan 10 21:00 aaa
-rwxr-xr-x 1 root root 2147483648 Jan 10 21:31 aab
-rwxr-xr-x 1 root root 2147483648 Jan 10 21:53 aac
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:05 aad
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:10 aae
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:17 aaf
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:24 aag
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:31 aah
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:37 aai
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:43 aaj
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:50 aak
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:56 aal
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:02 aam
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:06 aan
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:12 aao
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:32 aap
-rwxr-xr-x 1 root root  324998512 Jan 10 23:35 aaq

Now, I boot to the rescue system on server ‘B’ with the external drive plugged in, and run fdisk:
Code:
Disk /dev/sda: 498.8 GB, 498753077248 bytes
255 heads, 63 sectors/track, 60636 cylinders, total 974127104 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: 0x00059fd2

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdb: 2000.4 GB, 2000398933504 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029167 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: 0x00015a3d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907028991  1953513472    c  W95 FAT32 (LBA)

Notice sda is only 498.8GB where on server ’A’, it was 499.0. when I try to restore my files from the DD, I get an out of space error. To restore, I use the following:
Code:
    # cat /mnt/exthd/aa* | gunzip –c | dd of=/dev/sda
    
dd: writing to ‘/dev/sda’:  No space left on device
974127105+0 records in
974127104+0 records out
498753077248 bytes (499 GB) copied, 37067.3 s, 13.5MB/s

My guess, is that although the drives are the same capacity (3 – 250GB in RAID 5 array), the number of cylinders is different because it is a different model, and that is where it is running out of space, although I wouldn’t think it would.

Please correct me if I am wrong as I am a newbie, but if I do “# dd if=/dev/sda” that will take all the partitions with it? Such as sda1, sda2, sda3 correct?

Virtual CentOS 6.4 Server Expand Disk For Splunk Instance

As I'm sure there are other posts for this, I'm terrified to mess with disks in Linux as I'm very green. I've looked at one other post which suggests to run the following so I'm going to do the same. The drive provisioned originally had 400 gb, but currently has 500 gb allocated in vmware. Thanks so much in advance!

Code:
fdisk -l
pvs
vgs
lvs
df -h


Code:
[root@uspk10splunk ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
64 heads, 32 sectors/track, 8192 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c255c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2         501      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             502        8192     7875584   8e  Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/sdb: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x69437664

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       52216   419424988+  8e  Linux LVM

Disk /dev/mapper/vg_uspk10vsp03-lv_root: 3833 MB, 3833593856 bytes
255 heads, 63 sectors/track, 466 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_uspk10vsp03-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_opt-lv_opt: 429.5 GB, 429488340992 bytes
255 heads, 63 sectors/track, 52215 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Code:
[root@uspk10splunk ~]# pvs
  PV         VG             Fmt  Attr PSize   PFree
  /dev/sda2  vg_uspk10vsp03 lvm2 a--    7.51g    0
  /dev/sdb1  vg_opt         lvm2 a--  399.99g    0

Code:
[root@uspk10splunk ~]# vgs
  VG             #PV #LV #SN Attr   VSize   VFree
  vg_opt           1   1   0 wz--n- 399.99g    0
  vg_uspk10vsp03   1   2   0 wz--n-   7.51g    0

Code:
[root@uspk10splunk ~]# lvs
  LV      VG             Attr      LSize   Pool Origin Data%  Move Log Cpy%Sync                     Convert
  lv_opt  vg_opt         -wi-ao--- 399.99g                                                          
  lv_root vg_uspk10vsp03 -wi-ao---   3.57g                                                          
  lv_swap vg_uspk10vsp03 -wi-ao---   3.94g

Code:
[root@uspk10splunk ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_uspk10vsp03-lv_root
                      3.6G  1.5G  1.9G  45% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/mapper/vg_opt-lv_opt
                      394G  374G  422M 100% /opt
/dev/sda1             485M   32M  428M   7% /boot

Update Grub Command Not Working

I have made a change to GRUB2 bootloader in etc/default/grub.
Now I need to run 'update grub' for the change to take effect.
However, the 'update grub' command on the terminal is giving this error message:
Code:
root@debian:/# update grub
bash: update: command not found

Can someone please explain why this command is no longer working?

I've had to make a change to grub because I tried to install a new distro which meant I had to alter grub.
The install wasn't successful so I deleted the grub file and then re-installed it.
The re-installed grub needs a change so I can get sound on my pc.
However, I can't add these changes because the 'update grub' command doesn't work.

I've checked the grub file with another debian distro and they are both the same.
So now I don't know if I need to check if a different grub file is the problem or anything else.
Can someone help?

Recovering After Windows 7 Install: Rescue Cannot Mount Root

I have a dual boot laptop with debian stable & Windows 7.

The HD partitions a
sda1: NTFS for W7
sda2: FAT32 (currently unused)
sda3: linux /boot
sda4: linux ext4, which is LVM with encryption

I've re-installed W7 and now need to recover the MBR & grub menu.

I've booted with the netinst usb in rescue mode, but it fails to mount the root partition /sda4:
"An error occured while mounting the device you entered for your root file system (/dev/sda4) on /target"

and /var/syslog shows:
Code:
rescue-mode: selected root device '/dev/sda4'
umount: cant umount /target: Invalid argument
isofs_fill_super: bread failed, dev=sda4, iso_blknum=16, block=32
EXT2-fs (sda4): error: unable to readsuperblock
EXT3-fs (sda4): error: unable to readsuperblock
rescue: mount: mounting /dev/sda4 on /target failed: Invalid argument

So it seems like something is wrong with the mount command?

Would appreciate suggestions how to solve this.

Thanks

HOW-TO: Install Certificate And Verify

Dear All,

I am trying to install a certificate and then authenticate with LDAP,
but I think I have been lost somewhere in the middle :

In a CentOS 7 system,
First, I would like to make sure that the certificate is installed and used :

Code:
yum install ca-certificates
update-ca-trust enable
cp cacert.pem /etc/pki/ca-trust/source/anchors/
update-ca-trust extract

When I do :
Code:
openssl s_client -showcerts -connect ...:636

Code:
openssl verify cacert.pem 
cacert.pem: OK

Code:
openssl version -d
OPENSSLDIR: "/etc/pki/tls"

Solved with :
Quote:
openssl s_client -showcerts -connect ...:636

GRUB2 Scripts To Use Labels For Friendly Names

I am using linux mint and the grub menu gets configured automatically using scripts in /etc/grub.d. The menuentry that gets created is something like Code:
"linux mint (on /dev/sda1)"

. I use external drives sometimes and also have linux on my harddrive which I also switch between computers. It gets confusing when it says /dev/sda2 when it means something else. It boots fine because that actual boot command uses uuid. How can I change the text of the (script generated) description to also use partition labels or uuid (or the first few chars) just so I know which install will actually boot. like this: Code:
"Linux Mint (OFFICESSD)"
"Linux Mint (HOMEHDD)"
"Ubuntu (SANDISK)"
"Ubuntu (IMATION)"

I realise (maybe its the best way) I can change the "GRUB_TITLE=Linux Mint 17 Cinnamon 64-bit" in /etc/linuxmint/info but would rather a smoother way.

Dual-boot Grub Boot-repair Issue

Hello there,

I tried to install kali alongside windows and did it wrong probably. Now whenever I boot, grub loader sees only Kali and Free-DOS and doesn't see Windows.

I can still see the Windows partition in Kali and access the files however.
Searched online for a solution and saw that boot-repair could help me, however because some new update issue I cannot install it under Kali directly( see below link, it doesnt work for me).
askubuntu.com/questions/449818/cant-find-boot-repair-package-for-the-newest-version-of-ubuntu]

Long story short, I downloaded the iso version of boot-repair and tried to burn it onto a live-usb, but it doesn't load. All I get is a black screen with a terminal line running where I can't do anything.
I burned the iso using the terminal and the command below.
sudo dd bs=4M if=file.iso of=/dev/sdc
I burned the iso using unetbootin a couple of times and the same issue.


Any ideas? am I doing something wrong? How can I burn the iso disk to a live USB to run boot-repair? Or any other alternatives?

PS: first time linux user, I have no idea what am I doing so please be patient with me.





This is my output for running sfdisk -l.

Code:
sfdisk -l

Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+    118     119-    955836    c  W95 FAT32 (LBA)
/dev/sda2      59654   60801-   1148-   9215829    c  W95 FAT32 (LBA)
/dev/sda3        119+  59653   59535- 478214340    f  W95 Ext'd (LBA)
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5        119+  51030   50912- 408950091+   7  HPFS/NTFS/exFAT
/dev/sda6      58934+  59653     720-   5783368+  82  Linux swap / Solaris
/dev/sda7      51031+  58933    7903-  63479131   83  Linux
		start: (c,h,s) expected (1023,254,63) found (855,54,32)
		end: (c,h,s) expected (1023,254,63) found (565,254,63)

Disk /dev/sdb: 1020 cylinders, 240 heads, 62 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/104/54 (instead of 1020/240/62).
For this listing I'll assume that geometry.
Units = cylinders of 2875392 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+   2704-   2705-   7592960    b  W95 FAT32
		start: (c,h,s) expected (0,37,51) found (0,32,33)
		end: (c,h,s) expected (1023,103,54) found (945,103,54)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty