Create a bootable USB-disk for installations and tools using .iso images

The Acronis way

This method uses Grub4Dos and standard windows/dos utilities. Works only for smaller images (less than 2GB) and only for Legacy boot (not UEFI). See links at the end of the article for other methods.

Cloned from: https://kb.acronis.com/content/57232

Downloading grub4dos

Download grub4dos utility and grub installer to your computer and unpack them.
Currently, the latest version of grub4dos is grub4dos-0.4.4.zip and the latest version of grub installer is grubinst-1.1-bin-w32-2008-01-01.zip.

Making USB bootable

1. In Windows Explorer, open the installer’s folder and select grubinst_gui.exe:

2. Run the application:
Windows XP: Double-click grubinst_gui.exe
Windows 7 or later: Right-click grubinst_gui.exe and select Run as administrator:

3. Select Disk, then click Refresh and select the drive you want to create a bootable media on:

You can detect your drive by its size. In this example an 8GB flash drive is used.

3. In Part List click Refresh.

4. From the dropdown box select Whole disk (MBR):

5. Check the Don’t search floppy option, leave all the other options unchecked:

6. Click Install.
If the installation completes successfully, you will see this message:

7. Press Enter.

8. In Windows Explorer open the grub4dos folder, locate grldr and copy it to the target drive:

Creating ISO files of Acronis products

  1. Run the media builder of Acronis True Image.
  2. Select ISO file when offered to choose media destination:
  3. Create the ISO. You can save the ISO file directly to your flash drive or copy in later.
  4. Run the media builder of Acronis Disk Director.
  5. Select ISO file when offered to choose media destination:
  6. Create the ISO. You can save the ISO file directly to your flash drive or copy in later.

Setting up multiproduct boot

  1. Copy the ISO files to the flash drive if you haven’t done it yet. Now you should have 3 files on the drive:
  2. Open Notepad.
  3. Insert this content:
    timeout 10
    default 0title Acronis Disk Director
    map –mem –heads=0 –sectors-per-track=0 (hd0,0)/<DiskDirector>.iso (hd32)
    map –hook
    chainloader (hd32)
    boot

    title Acronis True Image
    map –mem –heads=0 –sectors-per-track=0 (hd0,0)/<TrueImage>.iso (hd32)
    map –hook
    chainloader (hd32)
    boot

    title CommandLine
    commandline

    title Reboot
    reboot

    title Halt
    halt

where <DiskDirector> is the name of the ISO file created in Acronis Disk Director and <TrueImage> is the ISO file created with Acronis True Image.

4. Save the file as menu.lst to the root directory of your flash drive. In Save as type select All files, otherwise the file might be saved as a .txt-file while we need a .lst-file.

You can double-check the file extention in Windows Explorer:

If you don’t see the extention, check this article for help.

Now your USB drive is ready and you can boot your computer with it.

Other methods

YUMI – Multiboot USB Creator

Ventoy – A New Bootable USB Solution

Recommended tools to put on the USB-drive

MiniTool Partition Wizard

The best partition manager
Version 9 and 9.1 is downloadable from here: http://www.it.nrru.ac.th/download/utilities/ (140MB)

HDClone

HDClone 6 Free Edition

Trinity Rescue Kit

Trinity Rescue Kit

Creating a bootable USB stick for Windows installation using diskpart

For the other way around, creating a bootable ISO from a USB:
https://aatayyab.wordpress.com/2016/05/09/convert-bootable-usb-to-an-iso-image/
might also be useful: https://www.dell.com/community/Windows-10/Windows-10-rebootable-iso/td-p/5030000

Cloned from: https://blog.bramp.net/post/2008/06/23/create-bootable-windows-server-2008-usb-stick/

Start diskpart

DISKPART> list disk

     Select the USB device from the list and substitute the disk number below
     when necessary

DISKPART> select disk 1
DISKPART> clean
DISKPART> create partition primary
DISKPART> select partition 1
DISKPART> active
DISKPART> format fs=fat32
DISKPART> assign
DISKPART> exit

xcopy X:\*.* /s/e/f Y:\

     where X:\ is your mounted image or physical DVD and Y:\ is your USB
     device

Diskpart info: http://www.computerhope.com/diskpart.htm
See also: USB install media with WIM file larger than 4GB

Mount multiple Google Drive accounts

Cloned from: http://askubuntu.com/questions/887755/how-can-we-mount-multiple-google-drive-accounts-on-our-system-using-google-drive

I am trying to mount multiple Google drive accounts on my system using Google-drive-ocamlfuse but i am unable to access multiple accounts. Can anyone tell what is the problem.

Please help me out


If you want to mount multiple google drives you will need to use the following procedure:

  • Create a new directory for the new Google Drive, for example mkdir /mnt/google-drive1
  • Then issue the below command:
    google-drive-ocamlfuse -label label /mnt/google-drive1

  • A new browser tab will open asking you to allow the software access to your google drive.

If you already signed in with another gmail account you will need to sign out and sign in with the ID of the new Google drive you want to mount.

VPN Tunnel Between an Ubuntu Linux Machine and a Cisco ASA Firewall

Cloned from: https://www.tunnelsup.com/vpn-tunnel-between-an-ubuntu-linux-machine-and-a-cisco-asa-firewall/

Config on the Cisco ASA (running 8.4) side

This config is identical to a normal remote access VPN:

! Create the general crypto statements
crypto ipsec ikev1 transform-set ESP-AES128-SHA esp-aes esp-sha-hmac 
crypto dynamic-map MAP-DYNAMIC 200 set ikev1 transform-set ESP-AES128-SHA
crypto map MAP-VPN 300 ipsec-isakmp dynamic MAP-DYNAMIC
crypto map MAP-VPN interface OUTSIDE
crypto ikev1 enable OUTSIDE
crypto ikev1 policy 5
 authentication pre-share
 encryption aes
 hash sha
 group 2
 lifetime 86400

! Define where the remote user can get to.
access-list ACL-RA-SPLIT standard permit host 172.16.200.200 

! Create the group policy
group-policy GRP-MYVPN internal
group-policy GRP-MYVPN attributes
 vpn-tunnel-protocol ikev1 
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value ACL-RA-SPLIT

! Create the tunnel group
tunnel-group TG-MYVPN type remote-access
tunnel-group TG-MYVPN general-attributes
 address-pool POOL-RA-SPLIT
 default-group-policy GRP-MYVPN
tunnel-group TG-KRONOLOGY ipsec-attributes
 ikev1 pre-shared-key suPerSeKret

! Create a username
username myUser password passw0rd privilege 1

Config setup on the Ubuntu Linux side:

Download the Cisco VPN client
sudo apt-get install vpnc

Configure the VPN settings
sudo vi /etc/vpnc/my-vpn.conf

IPSec gateway 20.20.20.20
IPSec ID TG-MYVPN
IPSec secret suPerSeKret
Xauth username myUser
Xauth password passw0rd

starting vpn:
sudo vpnc-connect my-vpn

stopping vpn:
sudo vpnc-disconnect

This VPN configuration will time out every now and then and won’t kick on again until you issue the above command to start it up again. In order to make this an always on VPN use a cron job. This example will check every 10 mins to see if tun0 exists if not, start connection):

sudo contab -e
*/10 * * * * [[ -d /sys/devices/virtual/net/tun0 ]] || /usr/sbin/vpnc /etc/vpnc/my-vpn.conf

Cloned from: http://www.linuxplanet.com/linuxplanet/tutorials/6773/1

Linux VPN Client for Cisco VPNs: vpnc

The Cisco VPN client, vpnc, enables your Linux workstation to connect to a Cisco 3000 series VPN concentrator PIX firewall. Until vpnc existed, corporate employees were often relegated to connecting to their company’s network via a Windows machine or with Cisco’s problematic VPN client for Linux. Thankfully, those days are over, but not without slight configuration effort. In this article we show you how to get it up and running.

Before you can connect, you will likely need to know the following information. If you do not have it, now is a good time to gather:

  • IPSEC gateway: the hostname or IP of the VPN server
  • IPSEC ID: the groupname
  • IPSEC secret: the shared password for the group
  • your username
  • your password

The group name and shared password is the most often used method for connecting to the Cisco IPSEC VPN. In lieu of certificates, this pre-shared key enables the forming of an IPSEC tunnel based on the shared secret.

Install Options

Depending on your Linux distribution, you will need to install the vpnc program before we can begin. Fedora, by default, now installs vpnc, so Fedora users can skip to the next section. Ubuntu users can run apt-get install vpnc as root.

You will likely want to use NetworkManager to enable quick VPN connections with a mouse-click in GNOME. Fedora’s NetworkManager is already prepared, but in Ubuntu you will need to install the network-manager-vpnc package.

Configuring vpnc Manually

If you are short on time, or the “just make it work” type, this section is optional, so feel free to skip ahead to the NetworkManager section below.

Now that vpnc is installed, you will notice an /etc/vpnc/ directory. This is where we will be working for a bit. Creating a configuration file is optional, but without it, you will enter all the necessary information manually every time you wish to connect to the VPN. If you wish to test your IP, group information, and user credentials, go ahead and manually run ‘vpnc’ as root.

The configuration file for vpnc is quite simple. Create a file named after the network you wish to connect to, for example: /etc/vpnc/enp.conf

Inside, you need to enter the information we talked about in the beginning of this article. Replace the example values with your information:

  • IPSec gateway: vpn17.example.com
  • IPSec ID: groupa
  • IPSec secret: groupapassword
  • Xauth username: charlie
  • Xauth password: passw0rd

Except, the group password needs to be decoded before handing it to vpnc. This is the major pain point for most users, and vpnc should automatically do this, but it does not. Enter the group password you were given by the VPN administrator into this Web page, and use the result as your group password: http://www.unix-ag.uni-kl.de/~massar/bin/cisco-decode

If you enter your username and password into the configuration file, ensure the permissions do not allow world-read access, especially if other user accounts exist on your workstation or laptop. In fact, you should think twice about storing this password at all, just in case your machine is ever compromised. If your password is not stored in the configuration file, you will be prompted for it when connecting.

Now that the configuration file exists, you can simply run sudo vpnc enp.conf (or leave off the .conf). You will now be connected to the VPN. If everything worked, and you will notice a new ‘tun’ interface in the ‘ifconfig’ output.

To disconnect from the VPN, simply run sudo vpnc-disconnect

Do note that the default route gets replaced with the VPN router (so all traffic goes through the VPN) when you are connected. See the vpnc man page for help changing this behavior, or simply remember to disconnect from the VPN when you are done.

Pro Tip: if you have established SSH connections, they will drop when you connect to the VPN. To avoid this, do not let vpnc change your default route. Configure vpnc to add just the routes to the networks you wish to access via the VPN, ensuring you specify tun0 as the interface. All your normal traffic will survive VPN connects and disconnects, including your existing SSH sessions (assuming they are not to IPs within the range of the VPN network).

Using NetworkManager

To create a new VPN connection using GNOME’s NetworkManager, click the network icon in the upper-right hand corner of the screen, then select VPN Connections -> Configure VPN. Click “Add” to create a new VPN connection.

If the NetworkManager vpnc plug-in is installed, you will be able to select the Cisco VPN option. The next screen will require that you enter the above mentioned information for the VPN connection. The GUI also presents you with the option to save your password.

After you click Apply, you’re done. To connect to the VPN, simply select the VPN name you entered via the NetworkManager Gnome applet under VPN Connections, and it will connect automatically.

Setup Wireless interface with WPA and WPA2 on Ubuntu

Cloned from: https://linuxconfig.org/setup-wireless-interface-with-wpa-and-wpa2-on-ubuntu

This article describes a simple steps to configure Wireless interface with WPA and WPA2 on Ubuntu and debian Linux. Before we can configure wireless network interface to be used with WPA and WPA2 encryption we need to install a wpasupplicant package:

# apt-get install wpasupplicant wireless-tools

Next change a permissions on /etc/network/interfaces to read/write by a root user only:

# chmod 0600 /etc/network/interfaces

Next use iwcofig command to get a name of your wireless interface:

# iwconfig

Open up /etc/network/interfaces file and add the following code to set wlan0 wireless interface to be used with DHCP:

auto wlan0
iface wlan0 inet dhcp
       wpa-ssid network-name
       wpa-psk pre-shared-key

In case you want to set your wireless interface with a static IP address add a following code into your /etc/network/interfaces file and alter it according to your needs:

auto wlan0
iface wlan0 inet static
       address 10.1.1.2
       netmask 255.0.0.0
       network 10.0.0.0
       broadcast 10.255.255.255
       gateway 10.1.1.1
       wpa-ssid network-name
       wpa-psk pre-shared-key

Restart your network and you should be done:

# /etc/init.d/networking restart

Other resources:
http://askubuntu.com/questions/294257/connect-to-wifi-network-through-ubuntu-terminal
http://askubuntu.com/questions/16584/how-to-connect-and-disconnect-to-a-network-manually-in-terminal