Friday, June 12, 2009

Migrating linux server

There is a small, tiny server running for small community.
It's running 24 hours, 7 days in my closet. ;-)
The server is operated in ubuntu linux.
Main purposes of this are sharing files through ftp, running small board, downloading from torrent, remote access from the office through secret ssh port, sharing files through samba.
Yes, It is doing a lot of work as small home server.
but hardwares running linux are not so powerful.
celeron 1GHz, 512 Mb memory, and harddisks of 10Gb, 80 Gb, and 80 Gb.
(VIA 694 chipset)

One of my collegue gave me a old computer.
It has Celeron 2.6 GHz (!), 256 Mb memory, and 40 Gb harddisk.
(Intel i845G chipset)

So I decide to migrate my old server to new -actually it is not a new one - machine.

This is my personal recording of migration process.

1. Intall Ubuntu linux from 8.10 CD.
2. Upgrade ubuntu linux from 8.10 to 9.04 through dist-upgrade.
3. Configure APM (Apache2, PHP5, MySQL5 )
4. Install additional softwares
(proftpd, openssh, telnetd, webalizer, phpmyadmin, mc, squid)
5.

Tuesday, May 19, 2009

Remote access to linux machine through firewalled network

I'm running my linux machine at home as well as windows PC.

this morning I left my PC in power-on condition because some backup work should be done. But i will still be in power-on condition after the backup work done, that is the waste of energy. but I can turn it off because I'm working in my office.

So I tried to connect to my windows machine via linux computer which runs 24 hours a day. It is possible to use remote desktop service runs on Vista.

Only remaining problem is a running X windows program in my office PC.
It need some trick called ssh tunneling.

I installed Xming to run X server in my office PC.
to run the X application, i use plink.exe which installed with putty ssh client.

Method is very simple.
First, start the Xming server in my office PC.
And start command console in same machine.
move to the folder putty is installed.
and type plink and some connection info.

here's my case.

C:\PROGRA~1\iPuTTY>plink -ssh -X -P 27 -pw aaa user@mylinuxpc.com xterm

(note: -P 27 is option for non-regular port number.
this option is required because my company block official ssh port(22) so I changed ssh port to 27 in my linux machine.)
then I can use any linux X application through this xterm.

I started tsclient program and tried to connect to my vista machine.

Saturday, April 04, 2009

Boot with grub, Vista, Ubuntu, OS X

I'm not sure which method can valid for my PC.
it seems kind of complicate concept such as efi_boot, vanilla kernel, guid, pc_bcd..

But i just downloaded 'boot_v9' and copy it into /boot directory in my ubuntu partition.
and added following paragraph in the /boot/grub/menu.lst

title Mac OSX Leopard
#root drive should be the partion which grub is installed. It's not where OSX intalled partition!!!!
root (hd1,2)
kernel /boot/boot_v9
boot
o

then It just work!!
http://www.insanelymac.com/forum/index.php?showtopic=85508

Now that boot_v9 supports sleep, I have revived this method.
Get boot_v9 from here:
http://www.mediafire.com/?rdonkiqyzlz

Rename it from boot to boot_v9

Follow the PC_EFI method below, except say boot_v9 everwhere it says boot_v8

[Important Edit regarding depreciation -- While the PC_EFI method works, and was necessary for those of us who used grub at one time, with the advent of Chameleon I consider it depreciated.]

CHAMELEON METHOD
To use Chameleon with Grub, do the following:
1) Download Chameleon (current version) from chameleon.osx86.hu
2) dd boot1h to the partition you have OS X installed onto.
3) copy boot to the root directory of your OS X partion
4) ignore the boot0 file -- it overwrites grub in your MBR and you don't need it with grub.
5) edit your grub menu.lst file to chainload in the usual manner, I.E.-- my OS X entry now reads:

title Mac OSX Leopard
rootnoverify (hd?,?) (replace ? with the values Grub uses for OSX partition -- differs from pc_efi method)
chainloader (hd?,?)+1 (same values)

This is much easier and more standardized, hence I consider the following pc_efi method depreciated.

PC_EFI METHOD

[EDIT -- this is intended for MBR partitioning. If you used GUID, see keso7's post below also
http://forum.insanelymac.com/index.php?s=&...st&p=859014
Linux lives nicely in the extended partition of an MBR system. FreeBSD will put its own slices in an MBR primary partition.]

Get boot_v8 (The pc_efi bootloader)
(Google "pc_efi v8.0 download")

Copy it to /boot inside linux [EDIT -- or FreeBSD]

Then edit /boot/grub/menu.lst

title Mac OSX Leopard
root (hd?,?) (replace with same values grub uses for Linux partition, not ones for OSX partition)
kernel /boot/boot_v8
boot

[EDIT -- Repetition because so many people miss this point -- use root(hd?,?) to match your LINUX entry. DO NOT point to your OS X partition. If you screw this up you will get grub error 17.]

[EDIT -- a few people report kernel /boot_v8 works for them rather than above. Possibly a difference between SUSE (which I use) and Ubuntu on the reports. In any event, if you put boot_v8 into the same location as the Linux kernel (for me /boot) the the path should be the same as the path to the Linux kernel in the Linux entry.]

[EDIT -- for FreeBSD, the root line would be root(hd?,?,a) -- the a refers to the first (boot) slice in the FreeBSD partition]

If OS X resides on a different HDD than Linux, you will have to enter a hex code for the appropriate drive during the boot process. [For simplicity, I advise you have Linux and OS X share a hard disk.]
80 -- 1st HDD
81 -- 2nd HDD
82 -- 3rd HDD

Alternately, so you don't have to enter code during boot process, make a tiny ext3 partition on the OS X HDD
copy boot_v8 there in a directory /boot
and replace (hd?,?) with the values of that partition

[EDIT -- At least theoretically, you should be able to do the same approach with Grub hosted on a Solaris system. However Solaris does not support my disk controller (ICH8R) so I cannot test this myself.]
=====================================
thanks to jesse wilkinson
http://linagra.com/2009/03/osx86-triple-boot-vista-ubuntu-grub-working-efi/
http://www.jessewilkinson.com/2008/02/14/triple-boot-vista-ubuntu-710-osx86-1051/

Triple Boot: Vista, Ubuntu 7.10, OSX86 10.5.1
February 14th, 2008

Filed under: Development, Hardware, High Technology

This is a step-by-step how-to of how exactly I set up my triple booting system on a PC. I used two hard drives for this configuration, one 400GB for my Vista + Ubuntu, and another 120GB for my OSX86 partition. This cleans up a lot of problems with getting the EFI bios to work.

Gateway GM5442

My hardware configuration:
-Intel Core 2 Duo E4400 (2.0 GHz)
-2GB DDR2 533MHz
-500GB + 120 GB SATA HD’s
-Board: Intel D945GCF
-Chipset: 82945G
-Intel GMA 950 Graphics
-10/100 Mbps Lan (Works on Vista + Ubuntu, not osx86)
-Integrated 8-Channel Sigmatel Audio (Works on Vista + Ubuntu, not on osx86)
-USB 2.0 Bluetooth Adapter (Works on Ubuntu + osx86, not on Vista)
-USB 2.0 Ethernet Adapter (Works on osx86, not on Vista + Ubuntu)
-USB 2.0 Audio Adapter (Works on osx86 + Vista, not on Ubuntu)

1. You will need:

* A PC with the same board/chipset/graphics for this install to work. A lot of computers come standard with this configuration.
* A copy of the Kalyway patched 10.5.1 OSX86 Install DVD.
* A copy of Ubuntu 7.10 (http://www.ubuntu.com)
* Any copy of Windows Vista (or xp really)
* Two (2) Hard drives! HIGHLY RECOMMENDED, makes life much easier and you don’t risk destroying your other partitions when installing OSX86.

2. Make sure both drives are attached by sata, configure your prefered vista drive as primary in your BIOS and go ahead and install it on your primary drive if you haven’t already.
3. When you’re done, use Vistas “disk management” tool under “computer management” in the “administrative tools” section of the control panel to free up some space in an additional partition for an Ubuntu install on your Vista Drive.
4. Insert your Kalyway disc and restart your computer, before the install starts jump into your BIOS.
5. Configure your hard drives so that your OSX hard drive will be primary instead of your vista drive. Exit + Save
6. Kalyway disc will start, allow the disk to load, it may take a few minutes. Patience is a virtue!
7. STOP, do not continue your installation yet, you need to partition!
9. Go to tools > disk utility and select your OSX hard drive from the left hand list.
10. Click the partition tab, and select 1 partition. Name your partition something simple, I used “osx”. DON’T USE SPACES. Choose MacOS Extended (Journaled) Filesystem. Do not click “apply” yet.
11. Choose “options” > this screen will appear:

MBR

12. For this hardware configuration only MBR will work with the EFI bios for this chipset. I’ve tried GUID, as it works better on intel processors, but nevertheless, no luck.
13. Click apply and complete the partitioning, close disk utility.
14. Continue the installer, agree to the terms + conditions. You will see a customize button before you click on “Install.” Click this option.
15. Check both the vanilla kernals and the EFI bootloader(MBR not GUID) at the bottom. I couldn’t get any of the sound drivers to work on my onboard sound, but i resolved the issue with a USB sound card (see bottom).
16. Click “done” and continue with the install.
17. When it’s all said and done, you should be able to restart and boot into OSX86 without the disc in the drive.
18. Eject the disc, and insert your Ubuntu 7.10 disc.
19. Restart the computer, and head into BIOS.
20. Reset your Vista drive as your primary hard drive. Save + Quit
21. When prompted to start ubuntu live cd, do so.
22. Once on the Ubuntu desktop, click install and follow the basic instructions. Use “largest continuous free space” for the space to install, and it will install to the empty partition on your vista drive you created in step 3. MAKE SURE YOU INSTALL GRUB BOOTLOADER!
23. Complete the install, eject Ubuntu disc, and restart.
24. When prompted with the Grub bootloader, choose Ubuntu 7.10 and boot into your linux partition.
25. Open up a new terminal and type in: “sudo fdisk -l” (confirm with password)
26. It should display a list of hard drives and their partitions, this will give you an idea of how you’ll need to configure GRUB, to boot into your OSX and Vista partitions. Keep this terminal open!
27. Open another terminal and type: “sudo gedit /boot/grub/menu.lst” (confirm with password)
28. In front of you a gedit window will appear with the current Grub configuration. You’re going to have to add some new entries to this setup.
29. This is what my menu.lst file looks like, yours should look very similar, however you’re partitions may be labeled differently. Replace “root (hdX,Y)” as needed to make it match what you have displayed in the terminal you opened in step 25 + 26.

default 0
timeout 5

title Mac OS X86
root (hd1,0)
chainloader +1
makeactive

title Windows Vista
root (hd0,1)
chainloader +1
makeactive

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=c50989a9-f628-48e8-90f7-d8b3836d6bc2 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=c50989a9-f628-48e8-90f7-d8b3836d6bc2 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
quiet

30. Once you’re sure you’re good, save and restart. The configuration I put in above should work beautifully with OSX being primary, Vista/XP secondary, and Ubuntu tertiary. ENJOY!

Extras I had to buy later:
- USB audio adapter (works out of the box) http://www.newegg.com/Product/Product.aspx?Item=N82E16829128002
- USB ethernet adapter (works with drivers on this page) http://www.newegg.com/Product/Product.aspx?Item=N82E16833114017
- USB bluetooth adapter(works out of the box) http://www.newegg.com/Product/Product.aspx?Item=N82E16833156069

Photos:
About the macStacks!StatsDesktop (Artifacts too…)hardware acceleration!All three os’s

Videos:
- Youtube video of my setup: http://www.youtube.com/watch?v=y1VD2lXpcZ0 (sorry it’s so quiet!)
Share:

* Digg
* del.icio.us
* Facebook
* Google
* Reddit
* Slashdot
* StumbleUpon

2 Responses to “ Triple Boot: Vista, Ubuntu 7.10, OSX86 10.5.1 ”

1.
Andres
March 17th, 2009 at 1:06 pm

I see you made this a year ago. I just won a very powerful PC on a contest for video editing but I want to experiment running OSX on it. Here are my PC specs:
# Ram: 12GB
# CPU: Intel Core i7 Processor i7-920 2.66GHz
# Case: Antec 900 Series
# DVD Drive: CD - DVD Drive
# Power Supply: Trio 650 Watt TruePower
# Operating System: Vista Ultimate 64 Bit
# Video Card: Radeon HD 4870 512MB 256-bit GDDR5
# Firewire Card: 32/64-Bit 3 Ports 1394
# System Drive: 250 GB SATA 7200 RPM
# A/V Storage: 2 TB SATA 7200 RPM

I’d like to use a firewire external hard drive to install it. On your blog you mentioned using “Kalyway patched 10.5.1 OSX86 Install DVD.” Is there any upgrades ever since you did this? Do you think it’ll work on an external HD? I could also install it on a external eSata HD, what I don’t whant is to mess with the original configuration the system came with.(other than the BIOS).
Thanks beforehand for any advise you can offer.
2.
Jesse Wilkinson
March 19th, 2009 at 1:05 pm

Wow, I wish I could win a computer that rediculous… You should try the iPC distribution, it may work out of the box, although I’m not sure if OSX even supports core i7 chipsets yet.

http://pcwizcomputer.com/ipcosx86/

You’ll have to search “the bay” to find the download, it’s a dvd.

Also you should do your research on insanelymac.com. The easiest way to search that site is to use google with the site:insanelymac.com parameter.

You can use this link for that:

http://www.google.com/search?q=core+i7+site%3Ainsanelymac.com

Good luck man