El Capitan
Sutherland
Otay
San Vicente
Hodges
Lakes Already Approved:
Elsinore
Big Bear
Cachuma
Hemet (with strict regulations)
January 20, 2013
January 14, 2013
uml and console job control
I started uml with my host debian file system:
./linux rootfstype=hostfs rw init=/home/tzhang/uml/init-uml.sh mem=64M TERM=linux eth0=tuntap,,,192.168.6.88
However the shell I get does not have job control. I tried multiple things found on internet but none did the trick for me. This is what finally solved the problem:
1. get busybox and build it with the "cttyhack" enabled (in shell section of menuconfig)
2. ln -sf busybox cttyhack
3. run that in your init. My init.sh looks like this:
#!/bin/bash
export PS1="[\\u@\\h:\\w] $"
export HOME=/home/tzhang
. /home/tzhang/.bashrc
ifconfig eth0 192.168.6.99
hostname -b R1
export PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/local/sbin:/usr/sbin
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t tmpfs tmpfs /var/run -o rw,nosuid,nodev
mount -t tmpfs tmpfs /var/log -o rw,nosuid,nodev
cd $HOME/uml
mount -t tmpfs /dev/ /dev/
/etc/init.d/udev start
/home/tzhang/uml/dropbear -r dropbear_rsa_host_key
exec setsid /home/tzhang/uml/cttyhack bash
./linux rootfstype=hostfs rw init=/home/tzhang/uml/init-uml.sh mem=64M TERM=linux eth0=tuntap,,,192.168.6.88
However the shell I get does not have job control. I tried multiple things found on internet but none did the trick for me. This is what finally solved the problem:
1. get busybox and build it with the "cttyhack" enabled (in shell section of menuconfig)
2. ln -sf busybox cttyhack
3. run that in your init. My init.sh looks like this:
#!/bin/bash
export PS1="[\\u@\\h:\\w] $"
export HOME=/home/tzhang
. /home/tzhang/.bashrc
ifconfig eth0 192.168.6.99
hostname -b R1
export PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/local/sbin:/usr/sbin
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t tmpfs tmpfs /var/run -o rw,nosuid,nodev
mount -t tmpfs tmpfs /var/log -o rw,nosuid,nodev
cd $HOME/uml
mount -t tmpfs /dev/ /dev/
/etc/init.d/udev start
/home/tzhang/uml/dropbear -r dropbear_rsa_host_key
exec setsid /home/tzhang/uml/cttyhack bash
This solved the problem beautifully. The last line is what did the trick for job control.
the udev daemon and dropbear made ssh possible.
the udev daemon and dropbear made ssh possible.
=============UPDATED 4/10/2017=====================
init.sh:
#!/bin/bash
export PS1="\u@\h:\w $"
export HOME=/home/tzhang
. /home/tzhang/.bashrc
ifconfig eth0 192.168.6.99
hostname -b R1
export PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/local/sbin:/usr/sbin
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t tmpfs tmpfs /var/run -o rw,nosuid,nodev
mount -t tmpfs tmpfs /var/log -o rw,nosuid,nodev
cd $HOME/uml
mount -t tmpfs /dev/ /dev/
ifconfig eth1 192.168.3.2
ifconfig eth0 192.168.2.2
busybox mdev -s
mkdir /dev/pts
mount -t devpts /dev/pts /dev/pts
#dropbear -r dropbear_rsa_host_key -p 2222
exec setsid /home/tzhang/uml/cttyhack bash
init.sh:
#!/bin/bash
export PS1="\u@\h:\w $"
export HOME=/home/tzhang
. /home/tzhang/.bashrc
ifconfig eth0 192.168.6.99
hostname -b R1
export PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/local/sbin:/usr/sbin
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t tmpfs tmpfs /var/run -o rw,nosuid,nodev
mount -t tmpfs tmpfs /var/log -o rw,nosuid,nodev
cd $HOME/uml
mount -t tmpfs /dev/ /dev/
ifconfig eth1 192.168.3.2
ifconfig eth0 192.168.2.2
busybox mdev -s
mkdir /dev/pts
mount -t devpts /dev/pts /dev/pts
#dropbear -r dropbear_rsa_host_key -p 2222
exec setsid /home/tzhang/uml/cttyhack bash
run.sh
./linux rootfstype=hostfs rw init=/home/tzhang/uml/init.sh mem=64M TERM=linux \
eth0=tuntap,tap0,,192.168.2.88 \
eth1=tuntap,tap1,,192.168.3.88
eth0=tuntap,tap0,,192.168.2.88 \
eth1=tuntap,tap1,,192.168.3.88
Host /etc/network/interfaces
# The primary network interface
auto ens33
iface ens33 inet manual
auto ens33
iface ens33 inet manual
auto ens38
iface ens38 inet manual
iface ens38 inet manual
auto tap0
iface tap0 inet manual
pre-up ip tuntap add tap0 mode tap user tzhang
up ip link set dev tap0 up
iface tap0 inet manual
pre-up ip tuntap add tap0 mode tap user tzhang
up ip link set dev tap0 up
auto tap1
iface tap1 inet manual
pre-up ip tuntap add tap1 mode tap user tzhang
up ip link set dev tap1 up
iface tap1 inet manual
pre-up ip tuntap add tap1 mode tap user tzhang
up ip link set dev tap1 up
auto br0
iface br0 inet dhcp
bridge_ports ens33 tap0
iface br0 inet dhcp
bridge_ports ens33 tap0
auto br0:1
allow-hotplug br0:1
iface br0:1 inet static
address 192.168.2.1
broadcast 192.168.2.255
netmask 255.255.255.0
allow-hotplug br0:1
iface br0:1 inet static
address 192.168.2.1
broadcast 192.168.2.255
netmask 255.255.255.0
auto br1
iface br1 inet dhcp
bridge_ports ens38 tap1
iface br1 inet dhcp
bridge_ports ens38 tap1
auto br1:1
allow-hotplug br1:1
iface br1:1 inet static
address 192.168.3.1
broadcast 192.168.3.255
netmask 255.255.255.0
allow-hotplug br1:1
iface br1:1 inet static
address 192.168.3.1
broadcast 192.168.3.255
netmask 255.255.255.0
January 13, 2013
uml with minimal debian
Build kernel:
1. get kernel
2. make ARCH=um defconfig
3. make ARCH=um menuconfig ; to remove options you don't need
4. make -j 12 ; parallel build
Build rootfs:
dd if=/dev/zero of=my.rootfs bs=1M seek=512 count=0 mkfs.ext2 -F my.rootfsmkdir rootfssudo mount -o loop my.rootfs rootfssudo debootstrap --arch=i386 --variant=minbase lucid rootfs
January 8, 2013
SQL Server 2008 can't login with newly created user
SQL Server was not configured to allow mixed authentication.
Here are steps to fix:
- Right-click on SQL Server instance at root of Object Explorer, click on Properties
- Select Security from the left pane.
- Select the SQL Server and Windows Authentication mode radio button, and click OK.
Right-click on the SQL Server instance, select Restart (alternatively, open up Services and restart the SQL Server service).
I wish Microsoft has better document.
Source: http://stackoverflow.com/questions/1719399/sql-server-2008-cant-login-with-newly-created-user