Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
soc:2009:pravin:journal:ubuntubko [2009/07/17 05:35]
less1
soc:2009:pravin:journal:ubuntubko [2009/07/17 06:01]
less1
Line 117: Line 117:
 which says that which says that
 <​code>​ <​code>​
-When switching another root device, initrd would pivot_root and then umount the ramdisk. But initramfs is rootfs: you shouldn'​t pivot_root rootfs and can't unmount it. Just delete everything out of it (except the new block device node, if any), overmount /, and exec the new init. (The klibc package contains a helper program in utils/​run_init.c to do this for you, and other packages have adopted this as switch_root.) ​+When switching another root device, initrd would pivot_root and then umount the ramdisk. But initramfs is rootfs: ​ 
 +you shouldn'​t pivot_root rootfs and can't unmount it. Just delete everything out of it (except the new block device node, if any), 
 + overmount /, and exec the new init. (The klibc package contains a helper program in utils/​run_init.c to do this for you,  
 +and other packages have adopted this as switch_root.) ​
 </​code>​ </​code>​
  
 Now, I don't know for sure, which files are not getting deleated and hence causing problem. Now, I don't know for sure, which files are not getting deleated and hence causing problem.
 +
 +==== A question ====
 +what is the differnece between debian script and ubuntu script that filesystem.squashfs is not working with ubuntu, but it works with debian?
 +
 +   - comparing ''​d/​scripts/​live''​ with ''​u/​scripts/​casper''​ --- too different, diff went crazy with this command. ​ They are as good as seperate program who do similar work.
 +   - comparing ''​d/​bin/​run-init''​ with ''​u/​bin/​run-init'',​ --- they are same.
 +   - comparing ''​d/​init''​ with ''​u/​init''​ -- not much of difference
 +
 +This approach is not working for me, I will try another approach.
 +
 +==== analyzing run_init.c ====
 +My guess is that, run_init.c is the one who is dying, and it seems he does allow you to specify the files which should not be deleted.
 +I want to see how to tell that to run_init.c
 +  - Another thing that I want to try out is, what if I dont delete the contents of initramfs? I will remove that check from run_init.c will system still boot?
 +    - My guess is that, ''​overmount /''​ may fail.
 +  - Now, I need to locate the source code of run_init.c
  

QR Code
QR Code soc:2009:pravin:journal:ubuntubko (generated for current page)