Skip to content

Instantly share code, notes, and snippets.

@suranands
Created December 23, 2014 10:51
Show Gist options
  • Select an option

  • Save suranands/7c1cf780a299093c3550 to your computer and use it in GitHub Desktop.

Select an option

Save suranands/7c1cf780a299093c3550 to your computer and use it in GitHub Desktop.
StackOverflow Qn abt DualBootSys
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# @Belgotux\n",
"\n",
"The Question is:\n",
"\n",
"I had Windows XP and Ubuntu 14.04 so far. And my friend named the existing windows drives (C,D,E) as `winc`, `wind` and `wine`. (I am not talking about Wine software at all here.)\n",
"\n",
"I recently replaced XP with Windows7 and Ubuntu stopped mounting winc anymore. Now I know the latest `C:drive` is mounted as `/dev/sda1` on `/media/gls` (`gls` is my computer's name)\n",
"\n",
"How can I rename this as `winc` and move it to a place where `wind` and `wine` mount (like /wind)? Old `winc` might be existing somewhere but it cannot be mounted as all of its contents have changed or something. I should replace this by the new C:drive.\n",
"\n",
"Thanks for the help.\n",
"\n",
"\n",
"## Here are the outputs of the commands you gave me."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"cat /etc/fstab"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"# /etc/fstab: static file system information.\r\n",
"#\r\n",
"# Use 'blkid' to print the universally unique identifier for a\r\n",
"# device; this may be used with UUID= as a more robust way to name devices\r\n",
"# that works even if disks are added and removed. See fstab(5).\r\n",
"#\r\n",
"# <file system> <mount point> <type> <options> <dump> <pass>\r\n",
"# / was on /dev/sda5 during installation\r\n",
"UUID=71742d19-67d8-4cc3-973a-84fa0585b2c1 / ext4 errors=remount-ro 0 1\r\n",
"# swap was on /dev/sda6 during installation\r\n",
"UUID=9bc8e1e6-18bb-4f3f-9f65-d79e21d7d14d none swap sw 0 0\r\n",
"# winc /dev/sda1\r\n",
"UUID=387860C37860820C\t/winc\tntfs defaults,umask=007,gid=46 0 0\r\n",
"# wind /dev/sda2 \r\n",
"UUID=F2E45F29E45EEEFB\t/wind ntfs defaults,umask=007,gid=46 0 0\r\n",
"# wine /dev/sda3 \r\n",
"UUID=8A446F25446F12ED\t/wine ntfs defaults,umask=007,gid=46 0 0\r\n",
"\r\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"ls -l /dev/disk/by-uuid/ | grep sda"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"lrwxrwxrwx 1 root root 10 Dec 23 10:41 \u001b[0m\u001b[01;36m71742d19-67d8-4cc3-973a-84fa0585b2c1\u001b[0m -> \u001b[40;33;01m../../sda5\u001b[0m\r\n",
"lrwxrwxrwx 1 root root 10 Dec 23 10:41 \u001b[01;36m8A446F25446F12ED\u001b[0m -> \u001b[40;33;01m../../sda3\u001b[0m\r\n",
"lrwxrwxrwx 1 root root 10 Dec 23 10:41 \u001b[01;36m9bc8e1e6-18bb-4f3f-9f65-d79e21d7d14d\u001b[0m -> \u001b[40;33;01m../../sda6\u001b[0m\r\n",
"lrwxrwxrwx 1 root root 10 Dec 23 10:41 \u001b[01;36mB4F09CDAF09CA3E0\u001b[0m -> \u001b[40;33;01m../../sda1\u001b[0m\r\n",
"lrwxrwxrwx 1 root root 10 Dec 23 10:41 \u001b[01;36mF2E45F29E45EEEFB\u001b[0m -> \u001b[40;33;01m../../sda2\u001b[0m\r\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"pwd"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 3,
"text": [
"u'/home/gls'"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment