How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

January 20, 2017

grub-install error: no such disk

Filed under: Linux — Tags: , , , — admin @ 6:42 pm

Well a new problem . After one hard failure in raid .. when I try to grub-install /dev/sda

This error appear

/usr/sbin/grub-probe: error: no such disk.
Auto-detection of a filesystem of /dev/md1 failed.
Please report this together with the output of “/usr/sbin/grub-probe –device-map=/boot/grub/device.map –target=fs -v /boot/grub” to <bug-grub@gnu.org>

So the fix is .. after you mount the partition like in this link http://matrafox.info/reinstall-grub-after-raid-crash.html

1. mv /boot/grub/device.map /boot/grub/device.map.old
2. grub-mkdevicemap
3. update-grub2 && grub-install /dev/sda && grub-install /dev/sdb

September 18, 2012

Generating a Certificate Signing Request (CSR) 2048 bits

Filed under: Linux — Tags: , , , , — admin @ 3:20 pm

How to create your 2048 bit CSR via SSH
Well first of all this is require by new hosting company .

To generate this you have to run

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
You must replace yourdomain with domain that you want to use. Example if is for matrafox.info
openssl req -new -newkey rsa:2048 -nodes -keyout matrafox.key -out matrafox.csr

You will be asked next question:

2. You will be prompted to enter some information for your CSR:

Country Name (2 letter code) [GB]:
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server’s hostname) []:
Email Address []:

Please enter the following ‘extra’ attributes to be sent with your certificate request

A challenge password []:
An optional company name []:

The ‘CN’ field (Common Name) is where you should enter the fully qualified domain name of the website you require the certificate for.
Note: for wildcard certificates, the Common Name should be in the format: *.mydomain.com

Try to not insert a password even if is less secure. However this will not require the password every time when you restart apache server .

How to convert csr to crt

Just run :
openssl x509 -req -in matrafox.csr -signkey matrafox.key -out matrafox.crt

Just replace matrafox.* with your file name

Powered by WordPress