Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, May 27, 2013

Wireless Bridging

My Asus USB dongle and 64-bit Bridge Linux don't play well together.

Enter dd-wrt and the E1200-V2 Cisco/Linksys N300 wireless router.

Flash the dd-wrt firmware to it, then set it up as a wireless bridge. Note that with Personal WPA2, encryption must be set to AES.

I did alter the beginning of the bridging setup a wee bit to make things a bit easier for my LAN subnet and network:
2.1 Disable wireless. I set things up on the Windows laptop, and it would keep automatically connecting to a wireless network, which caused IP address problems when trying to connect to the default dd-wrt address.
...
6.1 Change the IP address of the dd-wrt router to match your LAN subnet. In my case, that's 192.168.100.x.
6.2 Change the IP address of the computer to match what you just did to the router: 192.168.100.9. In Windows, you may have to reboot to get things to work properly after changing the IP address.
6.3 Login to the router (now at 192.168.100.x) with the username and password you created in Step 6.

Also, in general, where the instructions say to hit Save...don't. Just hit Apply.

After Step 26, if you've done everything correctly, the computer will have internet access.

27.1 Reenable wireless on the Windows computer and reboot. You may have to reset things back to DHCP after rebooting and connecting wirelessly.

Then, move the new bridge to the computer that you want to connect to your wireless network, and plug a network cable in between the router and the computer. And now you've got N-band. It's seen as a wired connection by the computer, as the wireless connection is handled entirely by the N300 bridge.

Bought the Belkin N300 first. Neither of these support bridging out of the box. dd-wrt does not support the Belkin unit.

Asus N13

I've finally got N-band on my Asus USB-N13. Turns out the kernel drivers are really old and crappy.

1) Download the Realtek (now Mediatek) drivers for the RT8070 /RT3070 /RT3370 /RT5370 /RT5372 USB here: Mediatek

2) Extract the contents, and browse to that directory in konsole.

3) For a 32-bit system, assuming you're using a network manager, edit the file "os/linux/config.mk" and change these two lines to "y":

HAS_WPA_SUPPLICANT=y
HAS_NATIVE_WPA_SUPPLICANT=y

4)  In a terminal, run "sudo make" and "sudo make install"

5) Now blacklist the conflicting drivers:
In PCLOS, edit "/etc/modprobe.d/blacklist" and add the following lines:

blacklist rt2800usb
blacklist rt2x00usb
blacklist rt2800lib
blacklist rt2x00lib
blacklist rt2870sta
6) Reboot with N-band wireless.

Note that this device and the compiled driver do NOT work on 64-bit systems. At least not on 64-bit Arch Linux.

See this page at the Bridge Linux forum for everything I tried for 64-bit. A huge +1 to ludvick there for his assistance.

Reference page for compiling the driver: Arch forum.

Monday, January 30, 2012

Adding a Windows HD to an Existing Linux Installation

So I got Duke Nukem forever for Christmas, and unforuntately there is no Linux version. Which, again unfortunately, means I need to add a small HD to my computer that will run Windows (XP Pro, which I have lying around still).

I found a cheap, 40G SATA HD at newegg.

To make Windows install easily, I physically unplugged the main HD which runs PCLOS, then went thru the standard WindowsXP install. When I was done, I plugged the main drive back in, and booted into Linux.

So now I needed to make a Grub entry for the Windows drive. Unfortunately, the standard Grub GUI provided with PCLOS will not work in this case, because the Windows drive is the second drive in the system, and stupid Windows needs to be on the first drive in order to function (stupid Bill Gates).

So, in this case, you need to edit /boot/grub/menu.lst manually, and add a secton, mapping hd1 to hd0 and hd0 to hd1 in order to trick Windows into think it's really on the first drive:

title DukeNukem
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1
And done.

And now everything works, and I can boot into either Windows or PCLOS just fine.

Only problem now is that I'm all out of gum...

Saturday, October 23, 2010

MakeMKV on PCLinuxOS

Well....goodbye Mandriva. Back to good ol' PCLOS. 32-bit, but I only have 3G RAM anyways. So now I need to build MakeMKV again.

Need to install these:
  • make
  • glibc
  • glibc-devel
  • libopenssl
  • libopenssl-devel
  • zlib
  • zlib1-devel
  • libqt4-devel
  • automoc4
  • libmesagl1-devel
  • gcc-c++
  • libexpat1-dev
And....we're back.

Sunday, July 18, 2010

Mandriva & MakeMKV

Well, having done a fresh install of Mandriva 2010.1, I needed to install all the development packages so that I can install MakeMKV. Since they only list the required packages if using something like Ubuntu, it takes some searching to figure exactly what is needed on Mandriva. So, here is the list of packages needed to build MakeMKV. This is only the basic list; a number of additional dependent packages will be installed as well:
  • lib64qt4
  • lib64qt4-devel
  • libstdc++-devel
  • automoc4
  • lib64mesagl1-devel
  • gcc-c++
  • lib64openssl1.0.0-devel
  • make
This is for a 64-bit system obviously.

Wednesday, May 20, 2009

Mounting An ISO Image

From the command line:
# su -
# mount -t iso9660 -o loop disk1.iso /mnt/disk

Automatically at boot, in /etc/fstab:
/path/to/disk1.iso /mnt/disk iso9660 user,loop 0 0

The directory /mnt/disk needs to already exist for both methods.

Monday, May 18, 2009

Stop Wasting CDs When Installing Linux

Since, I've run out of blank CDs, I needed to find a way to install Linux some other way. I can't even count how many CDs I've thrown away because each one becomes worthless 6-9 months later when a new version is released.

Fortunately, if your BIOS supports it (and most newer ones do), you can also boot from a USB thumb drive. Then install Linux from a second thumb drive containing an installation ISO image. The ISO image can also reside on the local hard drive, but since you might end up formatting the entire drive, it's easier to just put it on a second flash drive.

Before you begin, make sure that the thumb drive is formatted ext2 or ext3. vfat (the default for USB keys) may work, but an NTFS formatted key definately causes problems. Just reformat it as ext2 or ext3 to be safe.

For Mandriva, you need to get the boot image for the release that you're going to install. Go to a Mandriva FTP site, and browse to /i586/install/images or /x86_64/install/images depending on your CPU architecture. The USB boot image is called all.img. Save this file somewhere on your hard drive.

Creating the USB Boot Device
To create the boot device, you must copy the boot image to your usb drive, using the dd command, not the copy command. To do this, plug in the drive, but do not mount it. To check where the drive is attached you can do one of two things. The first option is to open up /var/log/messages and look at the output generated when you plugged in the key. This will tell you where the drive is attached. The other, easier way is to open up Mandrake Control Center->Local disks->Manage disk partitions and look at the tabs at the top of the page. The thumb drive will (usually) be the only unmounted drive, and will often be the only other drive listed on most desktop systems. In my case the drive device node is /dev/sdb.

Next, open a konsole as root, and change directories to the location you saved the all.img file. Enter this command: dd if=all.img of=/dev/sdb In some cases, you may need to include the partition number as well: dd if=all.img of=/dev/sdb1 Adjust as necessary for your particular situation.

If creating the boot drive from within MSWindows, you will need WinImage.

Once that is done, you can reboot with the flash drive installed. During the boot process, it is usually a good idea to go into the BIOS and make sure Boot From USB Device is enabled, and that the flash drive containing the boot image is selected as the first boot device. Setting this up varies by motherboard. Older systems can not boot from a USB device, and a BIOS upgrade may or may not be able to remedy this situation. My ASUS A8V did provide a BIOS upgrade that added this functionality. Your mileage may vary.

Once the install screen comes up, plug in your second flash drive, and select Install From Hard Disk. From there enter the location of the ISO file, and away you go!

I recommend installing the Mandriva Free dual arch ISO. Once that is done, log in as root, and run urpmi task-kde4. From there login to KDE, and then using Mandrake Control Center, install all the other programs that you need. This results in a very small, quick system, with a full KDE4 install, with a minimum of running services.

It's also a good idea to visit easy urpmi to get all your software sources setup correctly. Just follow the easy directions and you're set.

The next experiment will be to do this with a Ubuntu based distribution: eBox Platform. Hopefully I can use the same boot device.

A final note: Be sure that there is no information on the thumb drive that you want to save, as the dd command will destroy some existing data on the drive. You have been warned.

Wednesday, May 06, 2009

From Cooker To Stable

Mandriva 2009.1 Spring just became stable.

So, naturally, I need to stop using cooker updates, because I really don't want to start using the new cooker yet.

So I need to change all my update repositories. There is, fortunately, an easy way to do this. Open up MCC, go to Software Management, and click on "Configure media sources for install and update."

Delete everything there.

Then, browse to easyurpmi, select the current stable version and architecture (2009.1 & i586 in this case), then scroll to the bottom to the "Advanced" area. Click on "Refresh commands." Finally, open a konsole, "su -", and paste those two lines into it.

Done.

Easy.

Thursday, April 16, 2009

MSWindows Doesn't Have "su"...Now What?

MSWindows, damn it, doesn't really have anything equivalent to the "su" command in Linux. With su, while I am logged in as a normal user, I can temporarily get admin rights by opening up a konsole, and typing "su" followed by the root password.

So, in Windows XP, what can you do if, while logged in as a user, you need to modify a file that that was created by the administrator?

Normally, I'd say you're screwed, and you have to log out, and then log back in again as administrator. But I have recently discovered a little hack that gets you admin access as a normal user.

Right-click on the icon for IE, either in the Start Menu or on the quick launch bar--this won't work on the desktop icon--and select "Run As..." This will pop-up a dialog asking which user to run the application as. Click on "The following user" and select the local administrator for the machine. Enter the administrator password and hit OK.

MSIE will pop up. Hit the stop button, then, in the location bar, enter "C:". This will bring up the contents of the C: drive. From there, you can delete files, change permissons, etc.

Much easier than logging out.

Embedding Gallery Into Your Website

So, I just accidentally discovered that I can "embed" Gallery into my jabster.net site. I'll have to look into that.

Thursday, April 09, 2009

HD Video On Linux

Woo. Hoo.

I can now play my ripped HD-DVDs on my Linux box. h264 ones anyways. VC-1 is still a bit of a problem, but I should be able to transcode those to h264.

Per Phoronix: I need to use the vdpau codec and video output options to get hardware accelerated HD-h264 playback at full speed.

mplayer -cache 16384 -vc ffh264vdpau -vo vdpau trailer-autobot.mkv
The cache option is because the movie resides on a samba/cifs share.

Now runs perfectly. "Who knew?"

Tuesday, April 07, 2009

Max File Size

Another reason to not use ClarkConnect. It has a max file size of 16GB. Which translates into a 1096 byte block size.

Mandriva, on the other hand, uses a 4096 byte block size, which translates into a max file size of 2TB, and a max filesystem size of 16TB.

HD movies, especially while processing, can be much larger than 16GB.

To find the block size on an ext3 system: /sbin/dumpe2fs /dev/sda6