GithubHelp home page GithubHelp logo

ubuntu_serial's Introduction

Copyright 2012 Stephen Niedzielski. Licensed under GPLv3.

Recipe for Creating a Serial Installer

  1. Download the latest Ubuntu Server LTS daily.
  2. iso=precise-server-amd64.iso
  3. mkdir iso_r
  4. sudo mount "$iso" iso_r
  5. cp -a iso_r iso_rw
  6. sudo umount iso_r
  7. rmdir iso_r
  8. Edit iso_rw/boot/grub/grub.cfg.
  9. Under the "Install Ubuntu Server" entry, append: console=ttyS0,115200n8
  10. Before the first menuentry add: 1. serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 1. terminal --timeout=2 serial console
  11. Edit iso_rw/isolinux/isolinux.cfg.
  12. Comment out: #ui gfxboot bootlogo
  13. Append: serial 0 115200 0ร—003
  14. Edit iso_rw/isolinux/txt.cfg.
  15. Under the "Install Ubuntu Server" entry, append: console=ttyS0,115200n8
  16. sudo genisoimage -input-charset utf-8 -r -V 'Ubuntu Server' -cache-inodes -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o "$iso" iso_rw
  17. sudo chown $(id -u):$(id -g) "$iso"
  18. sudo rm -rf iso_rw

Installation on VM

Note: Ubuntu Server 12.04 LTS consumes about 1.8 GB. I recommend a 4 GB install.









  1. socat UNIX-CONNECT:/tmp/precise_server_serial_0_pipe PTY,link=/tmp/precise_server_serial_0_pty&
  2. echo stty cols $COLUMNS rows $LINES (Copy and paste this after logging into the VM.)
  3. screen /tmp/precise_server_serial_0_pty 115200

Note: sudo adduser "$USER" dialout

Updating the Grub

  1. Edit /etc/default/grub.
  2. GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,115200n8"
  3. GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"
  4. GRUB_TERMINAL=serial
  5. GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
  6. Write the changes to /boot/grub/grub.cfg: sudo update-grub.
  7. sudo reboot 0.

See also: info -f grub

Convert to a Real HDD

  1. Insert the disk.
  2. mount to find the disk.
  3. sudo umount #/media/...
  4. Ensure it's hosed sudo mkfs.vfat -I #/dev/sdX to prevent misconceptions.
  5. time vboxmanage clonehd --format RAW ~/VirtualBox\ VMs/precise_server_serial_0/Snapshots/\{0295b898-a4c5-415a-805e-69b70d00feb9\}.vdi ~/work/ubuntu_serial/precise_server_serial_0.img. This took about two 13 seconds. Note: avoid the pitfall of grabbing the root VDI. You can also write straight to /dev/sdX. If all works well, you should see a file that's exactly 2 GB. Note: don't use qemu-img convert. It's appears to be busted!
  6. time sudo dd if=precise_server_serial_0.img #of=/dev/sdX. This took about 18 minutes to copy over a USB to SD converter on a class 10 card and about 27 and a half minutes on an unmarked card, and about five and half minutes over a USB to SATA converter. If all works well, you should see some parititons in gparted.

Boot QEMU from a Real HDD

sudo qemu-system-x86_64 -nographic #/dev/sdX (Exit it with ctrl-a x).

ubuntu_serial's People

Contributors

niedzielski avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.