Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs225
vm
Commits
d581a91c
Commit
d581a91c
authored
9 years ago
by
Jeffrey Tolar
Browse files
Options
Downloads
Patches
Plain Diff
Add some newlines
parent
58c9f3ce
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
create_vm.sh
+7
-0
7 additions, 0 deletions
create_vm.sh
with
7 additions
and
0 deletions
create_vm.sh
+
7
−
0
View file @
d581a91c
...
...
@@ -104,30 +104,36 @@ locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
/usr/bin/mandb
# networking
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/wired
systemctl enable netctl@wired.service netctl-sleep.service
# setup pacman keyring
pacman-key --init
pacman-key --populate archlinux
# install bootloader
syslinux-install_update -i -a -m
uuid=
\$
(blkid -o value -s UUID
${
loopdev
}
p1)
sed -i '/APPEND/ s+root=[^ ]*+root=UUID='
\$
uuid'+' /boot/syslinux/syslinux.cfg
# fix a bug when running in QEMU - the 'block' hook has to be included in the initcpio
sed -i '/^HOOKS/ s/autodetect
\\
(.*
\\
) block/block autodetect
\\
1/' /etc/mkinitcpio.conf
mkinitcpio -p linux
# create default user, set passwords
useradd -G wheel -m
$DEFAULT_USER
echo "
$DEFAULT_USER
:
$DEFAULT_PASSWORD
" | chpasswd
echo "root:
$ROOT_PASSWORD
" | chpasswd
echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel
# autologin on tty1
mkdir -p /etc/systemd/system/getty@tty1.service.d
cat > /etc/systemd/system/getty@tty1.service.d/override.conf <<"gettyEOF"
...
...
@@ -136,6 +142,7 @@ ExecStart=
ExecStart=-/usr/bin/agetty --autologin
$DEFAULT_USER
--noclear %I 38400 linux
gettyEOF
# autostart X (xfce) on tty1
echo '[[ -z
\$
DISPLAY &&
\$
XDG_VTNR -eq 1 ]] && exec startx' >> /home/
$DEFAULT_USER
/.bashrc
chown
$DEFAULT_USER
:
$DEFAULT_USER
/home/
$DEFAULT_USER
/.bashrc
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment