Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Boot no Linux - Processo / Pt-English
- Estou a ler atualmente o livro
- "Programação Avançada Em Linux" de Glecon pela editora
- Novatec, e em um dos capitulos é mostrado como construir
- uma mini distro com o uso do busybox(apps base linux/gnu), iptables.
- Mas estou obtendo erro, a inicialização ocorre mas infelizmente não
- cai no bash. Andei a ler o livro "Linux From Scratch" atráz
- de uma luz mas estou tendo dificuldade.
- Basicamente os procedimentos foram:
- 1. Criar o diretorio tunix;
- 2. compilar o kernel gerando bzImage, e compilar o busybox;
- 3. criar a imagem (exemplo tunix.img);
- 4. gerar arquivo gz do diretorio raiz (contendo busybox instalado, e subdiretorios);
- 5. criar um arquivo syslinux.cfg (arquivo com as informações do boot);
- 6. montar a imagem (tunix.img) copiando bzImage, a imagem do diretorios raiz (que fora criado),
- e o arquivo configuração syslinux.cfg para o local onde foi montada a imagem;
- 7. Desmontar o diretorio onde foi montada a imagem (no tunix.img)
- 8. rodar o comando # syslinux -s <tunix.img>
- 9. Gravar em disquete (exemplo do livro), ou testar com o qemu;
- (1).Por Dentro do Processo de Inicialização do Linux
- http://www.ibm.com/developerworks/br/library/l-linuxboot/
- -----------------------------------------------------------------------------------------------
- #/etc/rcS
- #!bin/sh
- mount -t proc none /proc
- mount -t sysfs none /sys
- ifconfig -a
- /bin/sh
- #syslinux.cfg
- default linux
- prompt 0
- label Linux
- KERNEL vmlinuz
- APPEND load_ramdisk=1 initrd=rootfs.gz root=/dev/ram0 rw
- #inittab
- # Este é o primeiro script
- ::sysinit:/etc/init.d/rcS
- # Comece com o shell "askfirst" no console
- ::askfirst:/bin/sh
- # O que fazer quando restartar um processo init
- ::restart:/sbin/init
- # O que fazer antes de reiniciar
- ::ctrlaltdel:/sbin/reboot
- ::shutdown:/bin/umount a r
- Boot in Linux - Process
- I'm currently reading the book
- " Advanced Programming in Linux " Glecon from the publisher
- Novatec , and one of the chapters is shown how to construct
- a mini distro using busybox ( based apps linux / gnu ) , iptables .
- But I am getting error , initialization occurs but unfortunately not
- falls in bash . I've been reading the book " Linux From Scratch " Ago
- a light but am having difficulty.
- Basically procedures were :
- 1. Create the directory Tunix ;
- 2 . generating compile the bzImage kernel , and compile busybox ;
- 3 . create the image ( tunix.img example) ;
- 4 . generate gz file from the root directory ( containing busybox installed and subdirectories ) ;
- 5 . create a syslinux.cfg file ( file with the information of boot ) ;
- 6 . mount the image ( tunix.img ) copying bzImage , the image of the root directories ( which had been created ) ,
- and syslinux.cfg configuration file to the location where the image was assembled ;
- 7 . Unmount the directory where the image was mounted ( in tunix.img )
- 8 . run the command # syslinux - s <tunix.img>
- 9. Write to disk ( eg the book ) , or test with qemu ;
- ( 1 ) . Inside the Linux Boot Process
- http://www.ibm.com/developerworks/br/library/l-linuxboot/
- -------------------------------------------------- ---------------------------------------------
- # / etc / rcS
- # ! bin / sh
- mount- t proc none / proc
- mount- t sysfs none / sys
- ifconfig-a
- / bin / sh
- # syslinux.cfg
- linux default
- prompt 0
- label Linux
- KERNEL vmlinuz
- Load_ramdisk APPEND initrd = 1 = rootfs.gz root = / dev/ram0 rw
- # inittab
- # This is the first script
- :: sysinit :/ etc / init.d / rcS
- # Start with the shell " askfirst " in console
- askfirst :: :-/ bin / sh
- # What to do when restarting an init process
- :: restart :/ sbin / init
- # What to do before rebooting
- ctrlaltdel :: :/ sbin / reboot
- :: shutdown :/ bin / umount - a- r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement