about summary refs log blame commit diff stats
path: root/core/reboot.html
blob: 23e2996eb80a4b0500ad243ffc198128880f7b53 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                              
 
                                        
 


                                                                  

             




                                                      

              

                                  
             



                                                  

              
                                               
 



                                                       

                                                                     


                                                                      
 





                                                                      
             
                                            
                  
                                                                    

              
                                            




                                                                      
                                                                                                                          

              



                              
             
                                                                                         
                    

              
                                              
                                             
                          
                



                                                                                            
<!DOCTYPE html>
<html dir="ltr" lang="en">
    <head>
        <meta charset='utf-8'>
        <title>1.4. Prepare Reboot</title>
    </head>
    <body>

        <a href="index.html">Core OS Index</a>

        <h1>1.4. Prepare for Reboot</h1>

        <p>Follow this instructions with active chroot,
        first <a href="configure.html#chroot">mount partitions</a>
        and before chroot mount follow file systems;</p>

        <pre>
        $ sudo mount --bind /dev $CHROOT/dev
        $ sudo mount -vt devpts devpts $CHROOT/dev/pts
        $ sudo mount -vt tmpfs shm $CHROOT/dev/shm
        $ sudo mount -vt proc proc $CHROOT/proc
        $ sudo mount -vt sysfs sysfs $CHROOT/sys
        </pre>

        <p>Now you can chroot;</p>

        <pre>
        $ sudo chroot $CHROOT /usr/bin/env -i \
          HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
          PATH=/bin:/usr/bin:/sbin:/usr/sbin \
          /bin/bash --login
        </pre>

        <h2 id="linux">1.4.1. Linux Kernel</h2>

        <p>Core ports have two
        <a href="linux.html">linux kernels</a>,
        <a href="ports/linux-libre">linux-libre</a> and
        <a href="ports/linux-blob">linux-blob</a>.
        Port linux-libre kernel is a true source based kernel that
        respects your freedoms, is x86_64 but not generic configured,
        select modules (drivers) for your hardware, for example
        correct graphic driver and disk. Port linux-blob is dangerous,
        contain blobs (from bad corporations).</p>

        <p>Addition to upstream kernel is applied a patch with
        more cpu families gcc optimizations and grsecurity patch.
        Check tpe protection configuration on
        <a href="linux.html#sysctl">sysctl</a> if breaks functionality
        during initial configuration.</p>

        <pre>
        # cd /usr/ports/c9-ports/linux-libre
        # pkgmk -d
        # pkgadd /usr/ports/packages/linux-libre#4.9.11-2.pkg.tar.gz
        </pre>

        <h2 id="checkup">1.4.4. Checkup</h2>

        <p>If you have qemu installed you can see if it boots, in this
        example sdb is usb external drive;</p>

        <pre>
        # qemu-system-x86_64 -kernel /boot/vmlinuz-linux -initrd /boot/initramfs-linux.img -append root=/dev/sdb /dev/sdb2
        </pre>

        <h3>Debug Grub</h3>

        <h3>Debug initram</h3>

        <pre>
        /usr/lib/dracut/skipcpio /boot/initramfs-4.9.11-blob.img | gunzip -c | cpio -i -d
        36875 blocks
        </pre>

        <a href="index.html">Core OS Index</a>
        <p>This is part of the c9-doc Manual.
        Copyright (C) 2017
        c9 team.
        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
        for copying conditions.</p>
    </body>
</html>