Skip to content

Instantly share code, notes, and snippets.

View Lakshmipathi's full-sized avatar
👣

Lakshmipathi Ganapathi Lakshmipathi

👣
View GitHub Profile
@Lakshmipathi
Lakshmipathi / build_curl.md
Created August 3, 2016 10:20 — forked from bertrandmartel/build_curl.md
Build Curl for Android NDK

Build libcurl for android NDK

Libcurl requires openssl and zlib to be fully operationnal

  • Step 1 : cross compile zlib
  • Step 2 : cross compile openssl
  • Step 3 : cross compile curl with zlib/openssl external link

Prerequisites :

@Lakshmipathi
Lakshmipathi / uml-on-debian.md
Created February 2, 2018 19:09 — forked from gaoyifan/uml-on-debian.md
User Mode Linux on Debian Jessie

User Mode Linux on Debian Jessie

host kernel version: 3.16.36-1+deb8u2

target kernel version: 4.9-rc5

Build UML kernel

Preparation

@Lakshmipathi
Lakshmipathi / host
Created July 14, 2018 07:35 — forked from gedex/host
script to start UML (User Mode Linux).
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:fc:99:96:e3
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:fcff:fe99:96e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36311 errors:0 dropped:0 overruns:0 frame:0
TX packets:36902 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24450223 (24.4 MB) TX bytes:6426466 (6.4 MB)
Interrupt:16 Base address:0xe800
@Lakshmipathi
Lakshmipathi / host
Created July 14, 2018 07:35 — forked from gedex/host
script to start UML (User Mode Linux).
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:fc:99:96:e3
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:fcff:fe99:96e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36311 errors:0 dropped:0 overruns:0 frame:0
TX packets:36902 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24450223 (24.4 MB) TX bytes:6426466 (6.4 MB)
Interrupt:16 Base address:0xe800
@Lakshmipathi
Lakshmipathi / debugging_kernel.txt
Created August 28, 2018 05:00 — forked from hngouveia01/debugging_kernel.txt
Debugging kernel code line by line with Qemu and GDB
We are going to use buildroot to download, configure and compile the kernel.
First, download and uncompress buildroot: https://buildroot.org/download.html
Go to the directory and:
make qemu_x86_defconfig
make menuconfig
@Lakshmipathi
Lakshmipathi / osc-cheatsheet.md
Created December 6, 2018 09:12 — forked from FelixZhang/osc-cheatsheet.md
osc cheatsheet

osc cheatsheet

configuration

.oscrc

TBD

aliases

@Lakshmipathi
Lakshmipathi / mount_qcow2.md
Created December 26, 2018 15:58 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@Lakshmipathi
Lakshmipathi / build-ubuntu-rootfs.sh
Created June 22, 2019 03:18 — forked from smithclay/build-ubuntu-rootfs.sh
ubuntu bootstrap for user mode linux: minimal
#!/bin/sh
# This script creates a user-mode linux machine based on Ubuntu.
# Created by Clay Smith, May 2017
#
# based on: https://gist.github.com/aputs/6247216
# and https://gist.github.com/AVGP/5410903
set -x
@Lakshmipathi
Lakshmipathi / gce-to-gcs-uploads.md
Created November 30, 2020 09:06 — forked from ryderdamen/gce-to-gcs-uploads.md
Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.

Let's say you want to upload yourfile.txt to a GCS bucket from your virtual machine. You can use the gsutil command line tool that comes installed on all GCE instances.

If you've never used the gcloud or gsutil command line tools on this machine before, you will need to initialize them with a service account.

@Lakshmipathi
Lakshmipathi / nbd storage backend in qemu.
Created December 21, 2020 16:11 — forked from archerslaw/nbd storage backend in qemu.
nbd storage backend in qemu.
Network Block Device(nbd):
In Linux, a network block device is a device node whose content is provided by a remote machine. Typically, network block devices are used to access a storage device that does not physically reside in the local machine but on a remote one. As an example, the local machine can access a fixed disk that is attached to another computer.
1.start nbd-server to export a qcow2 image with absolute path on the NBD server host.
# nbd-server 12345 /home/my-data-disk.qcow2
2.launch a KVM guest with this exported image as a data disk.
# qemu-img info nbd:10.66.83.171:12345
image:
file format: qcow2
virtual size: 10G (10737418240 bytes)