Tuesday, July 7, 2015

Repairing GRUB UEFI Dual Boot Debian 7.1 x64 and Windows 8 x64

Accidentally I failed to install AMD Catalyst 13.6 beta on my Debian 7.1 x64, and I lost my GNOME. For short, I can't recover my GNOME and I reinstall my Debian 7.1 without EFI mood  (my mistake). The Installer can not detect EFI and the only option to install bootstrap loader is MBR.
I can not start both my Debian and Windows. From Bios, I start boot via EFI DVD to start Debian CD Installer. I choose Advanced Option to fix bootstrap location from MBR to EFI Partition (System Reserved), and follow these step:

  1. Update your Debian and run
    # apt-get install grub-efi-amd64
    This command will remove grub package, and choose yes
  2. Configure your GRUB using this command
    # modprobe dm-mod
    # grub-install
  3. Apply your new grub into EFI Partition
    # update-grub
  4. This procedure only fix boot into Debian. To create boot option to load Windows 8 boot manager you need UUID for EFI partition by running
    # blkid
    write down UUID for EFI Partition (it may be label as "System Reserved") with size about 100M-130M.
    for my case UUID is 4842-E4F1
  5. edit file /etc/grub.d/40_custom and at the end of file add
         menuentry "Microsoft Windows 8" {
           insmod part_gpt
           insmod fat
           insmod search_fs_uuid
           insmod chain
           search --fs-uuid --no-floppy --set=root 4842-E4F1
           chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
         }
    the file becomes like this:
         #!/bin/sh
         exec tail -n +3 $0
         # This file provides an easy way to add custom menu entries.  Simply type the
         # menu entries you want to add after this comment.  Be careful not to change
         # the 'exec tail' line above.
         menuentry "Microsoft Windows 8" {
           insmod part_gpt
           insmod fat
           insmod search_fs_uuid
           insmod chain
           search --fs-uuid --no-floppy --set=root 4842-E4F1
           chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
         }
  6. reinstall and reconfigure your grub by issuing :
    # grub-install
    # update-grub
Done, now I have GRUB to my Debian and option to load Windows 8 Boot Manager

Installing Webmin on Debian 7.1 (Wheezy)

Step to install Webmin on Debian 7.1:
1. Download Webmin installer for Debian from www.webmin.com
2. run as root (superuser)
3. install dependency packages
# apt-get install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions
4. install webmin
# dpkg -i ./webmin_1.630_all.deb
5. tes your installation using your browser https://localhost:10000
 Note: Don't forget to create webmin admin group and its user :)

How to create a WHM user without an associated domain

To create a user account in WHM that is not associated with a domain:

  1. Log in to the server as the root user via SSH.
  2. Create a user with the system utility with the following command:
    # adduser [username]
  3. Set a password for the user with the following command:
    # passwd [username]
  4. Create an entry in the resellers file with minimal permissions with the following command:
    # echo "[username]:all" >> /var/cpanel/resellers
  5. Log in to WHM as the root user.
  6. Navigate to Home >> Resellers >> Edit Reseller Nameservers and Privileges.
  7. Select username from the list, Click Submit.
  8. Apply the desired permissions to the user, Click Save.

 Note: replace [username] with Linux user id / login
Src: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/CreateAccountwithoutdomain
CLOSE INFO

Tomcat 6.x User Roles

file name [tomcat 6 folder]//conf/tomcat-users.xml
Available Rules
  • <role rolename="manager-gui"/>
  • <role rolename="manager-script"/>
  • <role rolename="manager-jmx"/>
  • <role rolename="manager-status"/>
WARNING: users with the manager-gui role should not be granted either the manager-script or manager-jmx roles
Example configuration
<tomcat-users>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <user username="example" password="example" roles="manager-gui"/>
</tomcat-users>

How to install Raspbian Wheezy to SD Card for Raspberry-pi using Debian Machine

Raspberry-pi is a community product for System On Chip (SOC). It's uses ARM Processor with low power usage. We can say, it's absolutely green computing. Unfortunately, the performance was poor, may be we can find more powerful 4, 6 or 8 core ARM with low power usage. 
This is how I install raspbian on raspberry-pi:
  1. Download raspbian form official site http://www.raspberrypi.org/downloads/
  2. From Debian open terminal as a root privilage
  3. If you dont't have image writer to SD-Card, install this pacakge first # apt-get install dcfldd
  4. Insert your SD-Card and find out where it's mounted by your Debian
    # dmesg
    [  995.384415] mmc0: new high speed SDHC card at address aaaa
    [  995.384943] mmcblk0: mmc0:aaaa SU08G 7.40 GiB
    [  995.390744]  mmcblk0: p1
  5. Unmount SD Card
    # umount /dev/mmcblk0
    umount: /dev/mmcblk0: not mounted
  6. Copy your Raspbian image into SD Card
    # dcfldd bs=4M if=[folder_input_file]/2013-09-25-wheezy-raspbian.img of=/dev/mmcblk0
  7. Make sure the SD-Card is writen properly
    # sync

Note:
Copying image may take a long time, it's size up to 2.96Gigabyte