Posted by: aneeska on: November 24, 2009
You must have seen this post in makeuseof.com . It walks you through step-by-step procedure with which you can boot Google’s Chrome OS from USB in any PC! If you haven’t tried the image, its time you hurry.
When Chrome OS boots (in my case a little under 10 seconds), it gives you a login screen like this:
Username : chronos
Password : password
It will give you this landing page:
It happened to me – I was sitting behind a proxy and the connection was not going through since in my network all the machines have static IPs – unknown, unassigned IPs can’t access internet.
In this situation (and similar ones) chrome OS will simply say “Unable to reach internet – Offline mode not supported in this build”
I tried login in from a terminal ( to reach a terminal, press Ctrl+Shift+F2 ) . But the same issue – I don’t have connection – I didn’t know root password.
So I mounted the disk in another linux machine.
The USB disk will have 3 partitions – two ext3 and one swap . To get the file system mount the third partition :
$ mount /dev/sdaX /mnt/sdaX
$ cd /mnt/sdaX
Task 1 : Remove password for root and chronos usernames
Open the file /etc/passwd in vi editor and locate the lines starting with “root” and “chronos“. Delete the first “x” in each of those lines – so that they will something like this :
root::….(do not alter the rest)
chronos::…(do not alter the rest)
Task 2 : Setup Static IP for the network
Open the file /etc/network/interfaces and put the following lines:
Next open /etc/resolv.conf and put the IP of your nameserver, like this:
nameserver 192.168.1.5
Done!
Reboot into the Chrome OS and type in only the username – “chronos” – Press enter and viola! you are in to Chrome OS!
Note: But the joy is short lived – ChromeOS crashes unfailingly after a maximum of five minutes in to the desktop!
Posted by: aneeska on: November 17, 2009
There’s no such option! There is – technically – but not quite.
Background:
I wanted to override certain aspects of the apache server using ‘.htaccess’ file, like ExpiredByType – for adding Expiry headers to files that are requested from the server – and SetOutputFilter – to send files gzip comoressed from server.
Here’s I what I wanted:
Add an expiry of one month from the time of access to the following File Types -
gif
javascript
jpeg
ico
css
Enable gzip compression for the following type of docs
html
css
javascript
Putting the above rules in “httpd.conf” worked fine. But when the same was put in “.htaccess”, these rules were ignored.
Reason:
In order for the server to use the settings from “.htaccess” file, the following condition need to be met:
- AllowOverride should be set to some thing other than “None”
To add Expiry header, the following conditions should be met:
- expires_module should be enabled in apache config file
- “ExpiresActive On” rule should be set
Solution:
AllowOverride take 3 types of arguements:
1. All - all directives in .htaccess context are allowed
2. None - .htaccess file is ignored by server
3.
This can be one among the following
a. AuthConfig
b. FileInfo - for Gzip compression
c. Indexes - for stamping expiry header
d. Limit
So the final httpd.conf should have the following lines:
LoadModule expires_module modules/mod_expires.so
AllowOverride FileInfo Indexes
In .htaccess file, the following rules are added:
#Add Expire header to the file types listed above
ExpiresActive On
ExpiresDefault “access plus 1 month”
ExpiresByType image/gif A2592000
ExpiresByType text/javascript A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A2592000
ExpiresByType text/css A2592000
#enable gzip compression
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css text/javascript text/plain
Posted by: aneeska on: November 2, 2009
Posted by: aneeska on: October 29, 2009
$ mdadm –create /dev/mdX –level=1 –raid-devices=2 /dev/sdY /dev/sdZ
- sdY , sdZ : partitions/disks taking part in the mirroring. They could be anything depending upon your situation. For ex, sdY could be sdc1 and sdZ could be sdf2
- mdX : name of the RAID partition on to which the partitions sdZ and sdZ are associated
Once the command is successfully executed, mdX will be listed in “/proc/partitions” as a partition. This can now be mounted and used a normal EXT2/3 partition. Now the partitions sdY and sdZ will contain exactly the same data.
info : To know the mirroring status as well as the health of the RAID arrays, do “cat /proc/mdstat” from command line. Output of the command is self-explanatory (else refer man pages).
$ mdadm –manage –stop /dev/mdX
The disk/partition sdY or sdZ will not be mountable by themselves using mount command. For that, “assemble” a raid array with any one of the disk which you want, as given below:
$ mdadm –assemble –run /dev/mdX /dev/sdY
or
$ mdadm –assemble –run /dev/mdX /dev/sdZ
To remove a RAID array configuration from the disks participating in RAID, use the “–zero-superblock” option removes the RAID information from the partitions and hence the partition will no longer will be recognized as a RAID component. Individual partitions (ex. mdY, mdZ) can be mounted afterwards and data will be preserved.
$ mdadm /dev/mdX –stop # stop RAID
$mdadm /dev/mdX –zero-superblock /dev/sdY
or
$ mdadm /dev/mdX –zero-superblock /dev/sdZ
Use the command for creating the RAID array. It will ask whether to create array with partitions containing ext2fs. Answer yes and the RAID array will be recreated. Existing data in the partitions will be preserved.
– acknowledgements to my friend jk for the info
Posted by: aneeska on: October 16, 2009
OS: Linux
Application : pdftk
Package : pdftk
Usage :
# pdftk 001.pdf 002.pdf cat output output.pdf