AndLinux: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Mount==
===Mounting a <tt>.dvi</tt> drive file===
Say you have a file <tt>D:\andlinux\drives\base.vdi</tt>. To mount it in AndLinux, add to your '''<tt>settings.txt</tt>''':
cobd0=D:\andlinux\drives\base.vdi

===Mounting a physical drive/partition/cdrom/usb ===
References:
* [http://colinux.wikia.com/wiki/Partitions Wiki Partitions page]
* [http://colinux.wikia.com/wiki/FAQ The Wiki FAQ]
* [http://www.andlinux.org/forum/viewtopic.php?t=71 an AndLinux forum post]

To mount an existing drive or partition, add to your '''<tt>settings.txt</tt>''':
<source lang="text">
hda=\Device\HarddiskVolume0 # To mount the whole drive
hda2=\Device\Harddisk0\Partition2 # To mount a single partition
</source>
Use '''<code>diskpart.exe</code>''' to get the number (other alternatives are ''dd'', ''dmdiag'' and ''explore2fs'', see [http://colinux.wikia.com/wiki/Partitions]).<br/>
'''{{red|Caution!}}''' To get things even more confusing the windows partition number is not the same as in Linux. Usually you have to use the same number or substract 1 (if not more). As explained on the [http://colinux.wikia.com/wiki/FAQ the Wiki FAQ], this might be due to Windows not allocating number to the extended partition
<source lang="text">
C:\> diskpart
DISKPART> list disk
DISKPART> select disk 0
DISKPART> list partition
...
Partition 3 Unknown 101 MB 24 GB <-- \Device\Harddisk0\Partition3
Partition 4 Extended 125 GB 24 GB <-- Ignored by Windows
Partition 5 Logical 3814 MB 24 GB <-- \Device\Harddisk0\Partition4 !!!
...
</source>

One can also mount a floppy, cd, usb:
<source lang="text">
fd0=\Device\Floppy0
cdrom0=\Device\Cdrom0
sda1=\Device\Harddisk1\Partition1 # Assuming usb is the 2nd hard disk
</source>

===Aliases ===
One can define block device aliases so that to match real linux name, like:
<source lang="text">
codb3=\Device\Harddisk0\Partition2
hda2=:cobd3
</source>

In ''AndLinux'' the partition can then be mounted as usual:
<source lang="bash">
mount -t ext3 /dev/hda2 /mnt/hda2
</source>

==Troubleshooting==
==Troubleshooting==
===Startup delays===
===Startup delays===
Line 12: Line 61:
</pre></div>
</pre></div>
:* '''Solution''': The fix proposed in [http://www.andlinux.org/forum/viewtopic.php?t=291&sid=7ef2f7b1234865dd3fabe645c1b48a25 this post] is to actually change the extension of the disk image file from <tt>.drv</tt> to something like <tt>.drive</tt> (ie. change <tt>./Drives/base.drv</tt> to <tt>./Drives/base.drive</tt> and <tt>./Drives/swap.drv</tt> to <tt>./Drives/swap.drive</tt>) and adapt the configuration files <tt>./settings.txt</tt> accordingly.
:* '''Solution''': The fix proposed in [http://www.andlinux.org/forum/viewtopic.php?t=291&sid=7ef2f7b1234865dd3fabe645c1b48a25 this post] is to actually change the extension of the disk image file from <tt>.drv</tt> to something like <tt>.drive</tt> (ie. change <tt>./Drives/base.drv</tt> to <tt>./Drives/base.drive</tt> and <tt>./Drives/swap.drv</tt> to <tt>./Drives/swap.drive</tt>) and adapt the configuration files <tt>./settings.txt</tt> accordingly.

===Network issues===

* Reference [http://colinux.wikia.com/wiki/Network coLinux page]. Some forum posts: [http://www.andlinux.org/forum/viewtopic.php?t=260], [http://www.andlinux.org/forum/viewtopic.php?t=72], [http://docs.blackfin.uclinux.org/doku.php?id=colinux:network].
* Possible issues:
** Message '''Network cable unplugged''' for TAP interface even when AndLinux started.
** Can't connect to AndLinux
* Possible fixes on Windows side:
** Check ''tuntap'' interface line in file <tt>settings.txt</tt>, it must read:
<source lang="text">
etho0=slirp,00:ff:55:16:00:00
eth1=tuntap,"TAP-Colinux",00:11:22:33:44:55
</source>
** Go to Windows ''Network Connections'' window.
** Check that the connection for device named ''TAP-Win32 Adapter V8 (coLinux)'' is indeed called '''TAP-Colinux''', as specified above.
** If not (for instance it is called '''Local Area Connection''' or '''Local Area Connection 2'''), then rename it!
** Check that this interface has a fixed IP address:
**: Address = 192.168.11.1
**: Mask = 255.255.255.0
**: Gateway = no default gateway
*Possible fixes on AndLinux side:
** Run <tt>/sbin/ifconfig</tt>. There must be 2 static network interface <tt>eth0</tt> and <tt>eth1</tt>, with settings as shown further below.
** Run <tt>netstat -rn</tt>. There must be only 1 gateway.
** Check that both network cards are seen by udev. Check <tt>/etc/udev/rules.d/70-persistent-net.rules</tt>:
<source lang="bash">
# PCI device 0x1a55:0x0005 (conet)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:ff:55:16:00:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1a55:0x0005 (conet)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:11:22:33:44:55", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
</source>
** Check <tt>/etc/network/interfaces</tt>.
<source lang="bash">
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo eth0 eth1

iface lo inet loopback

#iface eth0 inet dhcp

iface eth0 inet static
address 10.0.2.15
gateway 10.0.2.2
netmask 255.255.255.0

iface eth1 inet static
address 192.168.11.150
netmask 255.255.255.0
# gateway 192.168.11.1
</source>

Latest revision as of 14:53, 13 January 2011

Mount

Mounting a .dvi drive file

Say you have a file D:\andlinux\drives\base.vdi. To mount it in AndLinux, add to your settings.txt:

cobd0=D:\andlinux\drives\base.vdi

Mounting a physical drive/partition/cdrom/usb

References:

To mount an existing drive or partition, add to your settings.txt:

hda=\Device\HarddiskVolume0                    # To mount the whole drive
hda2=\Device\Harddisk0\Partition2              # To mount a single partition

Use diskpart.exe to get the number (other alternatives are dd, dmdiag and explore2fs, see [1]).
Caution! To get things even more confusing the windows partition number is not the same as in Linux. Usually you have to use the same number or substract 1 (if not more). As explained on the the Wiki FAQ, this might be due to Windows not allocating number to the extended partition

C:\> diskpart
DISKPART> list disk
DISKPART> select disk 0
DISKPART> list partition
  ...
  Partition 3    Unknown            101 MB    24 GB  <-- \Device\Harddisk0\Partition3
  Partition 4    Extended           125 GB    24 GB  <-- Ignored by Windows
  Partition 5    Logical           3814 MB    24 GB  <-- \Device\Harddisk0\Partition4 !!!
  ...

One can also mount a floppy, cd, usb:

fd0=\Device\Floppy0 
cdrom0=\Device\Cdrom0 
sda1=\Device\Harddisk1\Partition1              # Assuming usb is the 2nd hard disk

Aliases

One can define block device aliases so that to match real linux name, like:

codb3=\Device\Harddisk0\Partition2
hda2=:cobd3

In AndLinux the partition can then be mounted as usual:

mount -t ext3 /dev/hda2 /mnt/hda2

Troubleshooting

Startup delays

  • Interaction with Anti-Virus software - AV software may interact with the startup of AndLinux, typically by maintaining a lock on the 4GB disk image file base.drv while it is scanned.
    • Solution: To prevent this, one can exclude the andlinux directory from the AV on-access scanner. In McAfee, this is done by opening the VirusScan consoledouble-ckick On-Access Scanner → then select All Processes → open the pane Detection and click the button Exclusions... → click Add... to add a new exclusion → Browse to AndLinux directory and select Also exclude subfolders.
  • Stalling when mounting / - You experience a huge delay during the startup process, and when launching the FLTK console, you observe that andlinux is stalling on the message below.
ReiserFS: cobd0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on cobd0
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Modules already installed.
Closing /
kjournald starting.  Commit interval 5 seconds
  • Solution: The fix proposed in this post is to actually change the extension of the disk image file from .drv to something like .drive (ie. change ./Drives/base.drv to ./Drives/base.drive and ./Drives/swap.drv to ./Drives/swap.drive) and adapt the configuration files ./settings.txt accordingly.

Network issues

  • Reference coLinux page. Some forum posts: [2], [3], [4].
  • Possible issues:
    • Message Network cable unplugged for TAP interface even when AndLinux started.
    • Can't connect to AndLinux
  • Possible fixes on Windows side:
    • Check tuntap interface line in file settings.txt, it must read:
etho0=slirp,00:ff:55:16:00:00
eth1=tuntap,"TAP-Colinux",00:11:22:33:44:55
    • Go to Windows Network Connections window.
    • Check that the connection for device named TAP-Win32 Adapter V8 (coLinux) is indeed called TAP-Colinux, as specified above.
    • If not (for instance it is called Local Area Connection or Local Area Connection 2), then rename it!
    • Check that this interface has a fixed IP address:
      Address = 192.168.11.1
      Mask = 255.255.255.0
      Gateway = no default gateway
  • Possible fixes on AndLinux side:
    • Run /sbin/ifconfig. There must be 2 static network interface eth0 and eth1, with settings as shown further below.
    • Run netstat -rn. There must be only 1 gateway.
    • Check that both network cards are seen by udev. Check /etc/udev/rules.d/70-persistent-net.rules:
# PCI device 0x1a55:0x0005 (conet)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:ff:55:16:00:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1a55:0x0005 (conet)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:11:22:33:44:55", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
    • Check /etc/network/interfaces.
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo eth0 eth1

iface lo inet loopback

#iface eth0 inet dhcp

iface eth0 inet static
     address 10.0.2.15
     gateway 10.0.2.2
     netmask 255.255.255.0

iface eth1 inet static
     address 192.168.11.150
     netmask 255.255.255.0
#    gateway 192.168.11.1