How To: Fix Portable Ubuntu Remix in Windows

How To: Fix Portable Ubuntu Remix in Windows

The Portable Ubuntu Remix or pubuntu project allows Linux to run INSIDE Windows as a native win32 application. This is not the same as running Linux within a VMWare or Virtual Machine environment.

Recent versions have become much more stable, to the point that it’s now possible to even run Gnome (a typical Linux GUI Desktop). Screenshots can be found on Lifehacker.

Installing Pubuntu is actually pretty easy, just open the downloaded file, click on the application and follow the prompts.

The first thing to do after it’s installed is to change the default user and password. (pubuntu, 123456)

1. Open up a terminal
2. Type: adduser (Replace with the new user name from here down)
3. Enter the password 123456 if prompted for pubuntu’s password and then fill out the information it asks for
4. type: cd (Just to make sure you’re in the right directory)
5. type: cp ./* ..//
6. type: cp ./.* ..//
7. type: cd ../
8. type: chown *
9. type: chown .[^.]*
10. type: chgrp *
11. type: chgrp .[^.]*
12. type: sudo nano /etc/event.d/tty1
13. Find the line near the bottom that says: exec /sbin/mingetty –autologin pubuntu tty1
14. Replace pubuntu with the new name
15. press Ctrl+X, press Y, press ENTER
16. type: sudo nano /etc/init/tty1
17. Repeat steps 13-15
18. type: sudo visudo
19. Find the line that says: root ALL=(ALL) ALL
20. Underneath it, add the following line: ALL=(ALL) ALL
21. Repeat step 15
22. type: reboot

Every once in a while pubuntu’s fstab will get messed up. If it hangs when trying to launch, you need to do this:

1. Look for the pubuntu icon in your task bar, right click it, and click restore
2. In the terminal that pops up, press ESCAPE
3. type: mount -o remount,rw /
4. type: nano /etc/fstab
5. delete the “-e” at the beginning of a line, just after cofsX.
6. Press Ctrl+X, press Y, and press ENTER
7. type: nano /etc/init.d/postmount_pubuntu.sh
8. replace the first like (#! /bin/sh) with #! /bin/bash
9. Press Ctrl+X, press Y, and press ENTER (again)
10. type: reboot

How To: Redirect Linux display to OS X

How To: Redirect Linux display to OS X

Install Macports

Open X11 type: xhost + (allows incoming connections from ‘anywhere’)

for extra security add machine name or username ssh to linux machine and type: setenv DISPLAY “ip address”:0 or setenv DISPLAY “full hostname”:0 (Note setenv is a CSH command, you may need to switch shells)

replace ip address with the ip address of the machine you arer connecting from.

Launch program (such as Gimp) and start using it.

Poking a hole in that pesky firewall.

Poking a hole in that pesky firewall.

There are more than a few ways to access a firewall.  I will be giving a brief tutorial for one of the more common methods. Called “poking a hole”, or professionally called an SSH back door.  Please, please be careful with this, any script kiddy with 30 lines of code can exploit an SSH server.

This is a great post by IBM detailing it pretty well. If you have any question feel free to leave a comment and I will assist you.

  1. SSH from ginger to blackbox.example.com with the -R flag. I’ll assume that you’re the root user on ginger and that tech will need the root user ID to help you with the system. With the -R flag, you’ll forward instructions of port 2222 on blackbox to port 22 on ginger. This is how you set up an SSH tunnel. Note that only SSH traffic can come into ginger: You’re not putting ginger out on the Internet naked.You can do this with the following syntax: ~# ssh -R 2222:localhost:22 thedude@blackbox.example.com

    Once you are into blackbox, you just need to stay logged in. I usually enter a command like:

    thedude@blackbox:~$ while [ 1 ]; do date; sleep 300; done

    to keep the machine busy. And minimize the window.

  2. Now instruct your friends at tech to SSH as thedude into blackbox without using any special SSH flags. You’ll have to give them your password: root@tech:~# ssh thedude@blackbox.example.com .
  3. Once tech is on the blackbox, they can SSH to ginger using the following command: thedude@blackbox:~$: ssh -p 2222 root@localhost
  4. Tech will then be prompted for a password. They should enter the root password of ginger.

Thanks IBM.

How To: Use Dump to back up a full filesystem

How To: Use Dump to back up a full filesystem

Way back in the day when tape drives first started being heavily used to do backups of Unix machines, the dump command was created. In typical Unix simplicity the dump command “dumps” files from one device to another device. This can be a tape drive, a hard drive, even a network share. rsync does a similar process but is meant for immediate use of those files.

First step is to be sure dump is installed. If not use, rpm, yum, port, apt-get, or your local repository method to install dump on your system.

The quickest command to get started is: dump -0 -j9 -f /pathtosavebackup /pathtobackup

This would give us a down and dirty dump of the requested path, or if / is used in the second part of the command, the full file system starting at the root.

-j9 tells the command to compress (using tar) the file as much as possible.

-f defines the device (or filesystem path) to dump too. Keep in mind that this command could not be used to dump files from the local filesystem back to the local filesystem.

The bad news is that this will take quite a while depending on how much data needs to be dumped, how fast the hard drives (or tape drive) is, and if backing up to a network share, how fast the ethernet connection is. In my tests 100gb filesystem got compressed down to 23gb, and took about fives hours across a 10/100 connection.

After the dump is done, tar can be used to unarchive the file to a new file system.